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
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
def test_play(): board = Board() assert board.current == BLACK board.play(coord2d(4, 4)) assert board.current == WHITE board.play(coord2d(3, 3)) assert board.current == BLACK board.play(coord2d(6, 6)) assert board.at(coord2d(4, 4)) == BLACK assert board.at(coord2d(3, 3)) == WHITE assert board.at(coord2d(6, 6)) == BLACK
def test_toggle_edit_remove(): board = Board(9) board.play(10) board.toggle_edit(10, BLACK) assert board.at(10) == EMPTY