Exemple #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)
Exemple #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)
Exemple #3
0
 def testWorld_Test(self):
     world = World()
     world.activate(1, 1)
     world.nextGeneration()
     self.assertEqual(world.get(1, 1), Dead)
Exemple #4
0
 def testWorld_getMethod(self):
     world = World()
     self.assertEqual(world.get(1, 1), Dead)