示例#1
0
def test_reset_new_board():
    env = Environment(2, 2, 2)
    env.take_action(0)
    env.reset()
    assert env.b.cells[0, 0] == Cell.EMPTY
    assert env.b.cells[0, 1] == Cell.EMPTY
    assert env.b.cells[1, 0] == Cell.EMPTY
    assert env.b.cells[1, 1] == Cell.EMPTY
示例#2
0
def test_reset_history_cleared():
    env = Environment(2, 2, 2)
    env.take_action(0)
    env.reset()
    assert env.history == []
示例#3
0
def test_reset_new_board_num_moves_reset():
    env = Environment(2, 2, 2)
    env.take_action(0)
    env.reset()
    assert env.num_moves == 0