Example #1
0
 def testCreateNewGenerationFalse(self):
     game = GameOfLife(4, 8, [['.', '.', '.', '.', '.', '.', '.', '.'],
                              ['.', '.', '.', '.', '.', '.', '.', '.'],
                              ['.', '.', '.', '.', '.', '.', '.', '.'],
                              ['.', '.', '.', '.', '.', '.', '.', '.']], 4)
     self.assertEqual(game.createNewGeneration(), False)
Example #2
0
 def testCreateNewGenerationNotEqual(self):
     game = GameOfLife(4, 8, [['.', '.', '.', '.', '.', '.', '.', '.'],
                              ['.', '.', '.', '*', '*', '.', '.', '.'],
                              ['.', '.', '.', '*', '*', '.', '.', '.'],
                              ['.', '.', '.', '.', '.', '.', '.', '.']], 3)
     self.assertNotEqual(game.createNewGeneration(), True)
Example #3
0
 def testCreateNewGenerationEmpty(self):
     game = GameOfLife(0, 0, [[]], 2)
     self.assertEqual(game.createNewGeneration(), False)