Esempio n. 1
0
 def testWorld_ThreeCells_OneLives(self):
     world = World()
     world.activate(2, 1)
     world.activate(2, 2)
     world.activate(1, 2)
     world.nextGeneration()
     self.assertEqual(world.get(1, 1), Alive)
Esempio n. 2
0
 def testWorld_nextGenUpdatesWorldAllTogether(self):
     world = World()
     world.activate(1, 1)
     world.activate(3, 1)
     world.activate(2, 2)
     world.nextGeneration()
     self.assertEqual(world.get(2, 1), Alive)
Esempio n. 3
0
 def testWorld_Test(self):
     world = World()
     world.activate(1, 1)
     world.nextGeneration()
     self.assertEqual(world.get(1, 1), Dead)