示例#1
0
文件: test.py 项目: LenaAn/Retreat
    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)
示例#2
0
文件: test.py 项目: LenaAn/Retreat
 def test_assignment(self):
     g = Game_Of_Life(n=5)
     g.setAlive(1, 1)
     self.assertEqual(g.isAlive(1, 1), True)