def test_counting_0_corner_cell_neighbours(self): world = World(2, 2) world.set([ [Cell(0), Cell(0)], [Cell(0), Cell(0)] ]) self.assertEqual(0, world.get_neighbourhoods()[0][0])
def test_counting_4_center_cell_4_neighbours(self): world = World(3, 2) world.set([ [Cell(1), Cell(1), Cell(1)], [Cell(1), Cell(1), Cell(0)] ]) self.assertEqual(4, world.get_neighbourhoods()[0][1])