added getNumberOfTiles method to grid class