def test_cant_take_if_no_middle_piece(self): board = Board() board.reset() board._board[4, 3] = Piece("white", None) assert not board._check_can_take(18, 9)
def test_black_can_take_white(self): board = Board() board.reset() board._board[2, 1] = Piece("black", None) board._board[3, 2] = Piece("white", None) assert board._check_can_take(9, 18)
def test_white_can_take_black(self): board = Board() board.reset() board._board[4, 3] = Piece("white", None) board._board[3, 2] = Piece("black", None) assert board._check_can_take(18, 9)
def test_cant_take_if_middle_piece_is_same_as_taking_piece(self): board = Board() board.reset() # Put white pieces next to one another board._board[4, 3] = Piece("white", None) board._board[3, 2] = Piece("white", None) assert not board._check_can_take(18, 9)