Restores the previous position and returns the last move from the stack.

        :raises: :exc:`IndexError` if the stack is empty.

def pop(self: BoardT) -> Move:
        """
        Restores the previous position and returns the last move from the stack.

        :raises: :exc:`IndexError` if the stack is empty.
        """
        move = self.move_stack.pop()
        self._stack.pop().restore(self)
        return move