Exemple #1
0
    def test_step_rule_4(self):
        initial_state = [[0, 1, 0], [0, 1, 1], [0, 0, 0]]
        next_state = np.array([[0, 1, 1], [0, 1, 1], [0, 0, 0]])

        game = GameOfLife(initial_state=initial_state)
        game.step()
        game_state = game.get_state()
        self.assertTrue(np.array_equal(game_state, next_state))