(self, nmoves=1000, verbose=True)
return history
Method for starting the play of a game to completion. If one of the
        players is a Human_Player, then the interaction with the human is via
        the text terminal.

        Parameters
        -----------

        nmoves:
          The limit of how many moves (plies) to play unless the game ends on
          it's own first.

        verbose:
          Setting verbose=True displays additional text messages.
Method for starting the play of a game to completion. If one of the
        players is a Human_Player, then the interaction with the human is via
        the text terminal.
Method for starting the play of a game to completion . If one of the players is a Human_Player then the interaction with the human is via the text terminal .
def play(self, nmoves=1000, verbose=True):
        """
        Method for starting the play of a game to completion. If one of the
        players is a Human_Player, then the interaction with the human is via
        the text terminal.

        Parameters
        -----------

        nmoves:
          The limit of how many moves (plies) to play unless the game ends on
          it's own first.

        verbose:
          Setting verbose=True displays additional text messages.
        """

        history = []

        if verbose:
            self.show()

        for self.nmove in range(1, nmoves + 1):

            if self.is_over():
                break

            move = self.player.ask_move(self)
            history.append((deepcopy(self), move))
            self.make_move(move)

            if verbose:
                print(
                    "\nMove #%d: player %d plays %s :"
                    % (self.nmove, self.current_player, str(move))
                )
                self.show()

            self.switch_player()

        history.append(deepcopy(self))

        return history
def play ( self , nmoves = 1000 , verbose = True ) : history = [ ] if verbose : self . show ( ) for self . nmove in range ( 1 , nmoves + 1 ) : if self . is_over ( ) : break move = self . player . ask_move ( self ) history . append ( ( deepcopy ( self ) , move ) ) self . make_move ( move ) if verbose : print ( "\nMove #%d: player %d plays %s :" % ( self . nmove , self . current_player , str ( move ) ) ) self . show ( ) self . switch_player ( ) history . append ( deepcopy ( self ) ) return history