Beispiel #1
0
    def test_change_state(self):
        g = Game_Of_Life(n=5)
        g.setAlive(1, 1)
        g.setAlive(2, 2)
        g.setAlive(0, 2)
        g.setAlive(2, 0)
        g.nextState()

        self.assertEqual(g.isAlive(1, 1), True)
        self.assertEqual(g.isAlive(0, 0), False)
Beispiel #2
0
 def test_assignment(self):
     g = Game_Of_Life(n=5)
     g.setAlive(1, 1)
     self.assertEqual(g.isAlive(1, 1), True)