refactored getNeighbors to use coordinates, and implemented countLiveNeighbors