This calculation only uses information from the grid so makes sense to be done by the grid class. The previous helper function was passed a copy of the grid as a parameter already.