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