Example #1
0
def test_edit_cycle():
    board = Board(9)
    board.toggle_edit(10, BLACK)
    board.toggle_edit(11, WHITE)

    board.edit_cycle(10)
    board.edit_cycle(11)
    board.edit_cycle(12)

    assert board.at(10) == WHITE
    assert board.at(11) == EMPTY
    assert board.at(12) == BLACK
Example #2
0
def test_toggle_edit():
    board = Board(9)

    board.toggle_edit(10, BLACK)
    board.toggle_edit(11, WHITE)
    board.toggle_edit(12, WHITE)

    assert board.at(10) == BLACK
    assert board.at(11) == WHITE
    assert board.at(12) == WHITE

    board.toggle_edit(11, WHITE)
    assert board.at(11) == EMPTY
Example #3
0
def test_toggle_edit_remove():
    board = Board(9)
    board.play(10)

    board.toggle_edit(10, BLACK)
    assert board.at(10) == EMPTY