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)
def test_assignment(self): g = Game_Of_Life(n=5) g.setAlive(1, 1) self.assertEqual(g.isAlive(1, 1), True)