def make_move(self, coordinates, player):
        """ Will modify the internal state to represent performing the
            specified move for the specified player.
        """
        x, y = coordinates

        moves = [piece.get_position() for piece in self.get_move_pieces(player)]

        if coordinates not in moves:
            raise ValueError

        if (x < 0 or x >= WIDTH) or (y < 0 or HEIGHT >= y):
            raise ValueError

        opponent = get_opponent(player)
        p = self.pieces[x + (y * WIDTH)]
        if player == WHITE:
            p.set_white()
        else:
            p.set_black()
        for d in DIRECTIONS:
            start = x + (y * WIDTH) + d
            tile = start

            to_flip = []
            if (tile >= 0) and (tile < WIDTH*HEIGHT):
                while self.pieces[tile].get_state() != BOARD:
                    to_flip.append(self.pieces[tile])
                    if self.outside_board(tile, d):
                        break
                    else:
                        tile += d

                start_flipping = False
                for pp in reversed(to_flip):
                    if not start_flipping:
                        if pp.get_state() == opponent:
                            continue
                    start_flipping = True

                    if player == WHITE:
                        pp.set_white()
                    else:
                        pp.set_black()

                self.pieces[start].reset_flipped()
dataset/ETHPy150Open Zolomon/reversi-ai/game/board.py/Board.make_move/swapped operands of `>=`