def print_board(self, player):
    "\n        Pretty-print the current boards of a player.\n\n        Prints both boards for a player, along with coordinate references, titles, and boxes around the grids.\n\n        Parameters\n        ----------\n        player : int\n            Determines which player's grids to print. Zero-indexed.\n\n        Returns\n        -------\n        str\n            Same as the string that is printed.\n        "
    characters = (('.' + letters) + '*0#')
    self.update_board(player)
    if (player == 0):
        board = self.p1_grid
        board_2 = self.p1_grid_2
    else:
        board = self.p2_grid
        board_2 = self.p2_grid_2
    result = (((('    +' + ('-' * ((self.width * 2) + 1))) + '+') + ('-' * ((self.width * 2) + 1))) + '+\n')
    result += (((('    |' + 'Your Board'.center(((self.width * 2) + 1))) + '|') + 'Enemy Board'.center(((self.width * 2) + 1))) + '|\n')
    result += (((('    +' + ('-' * ((self.width * 2) + 1))) + '+') + ('-' * ((self.width * 2) + 1))) + '+\n')
    if (self.width > 9):
        result += (((('    | ' + ' '.join([str((x + 1)).rjust(2)[0] for x in range(self.width)])) + ' | ') + ' '.join([str((x + 1)).rjust(2)[0] for x in range(self.width)])) + ' |\n')
    result += (((('    | ' + ' '.join([str((x + 1)).rjust(2)[1] for x in range(self.width)])) + ' | ') + ' '.join([str((x + 1)).rjust(2)[1] for x in range(self.width)])) + ' |\n')
    result += (((('+---+' + ('-' * ((self.width * 2) + 1))) + '+') + ('-' * ((self.width * 2) + 1))) + '+\n')
    for i in range(self.height):
        result += (((((('| ' + letters[i]) + ' | ') + ' '.join([characters[x] for x in board[i]])) + ' | ') + ' '.join([characters[x] for x in board_2[i]])) + ' |\n')
    result += (((('+---+' + ('-' * ((self.width * 2) + 1))) + '+') + ('-' * ((self.width * 2) + 1))) + '+')
    print(result)
    return result
Pretty-print the current boards of a player.

Prints both boards for a player, along with coordinate references, titles, and boxes around the grids.

Parameters
----------
player : int
    Determines which player's grids to print. Zero-indexed.

Returns
-------
str
    Same as the string that is printed.
def print_board(self, player):
    "\n        Pretty-print the current boards of a player.\n\n        Prints both boards for a player, along with coordinate references, titles, and boxes around the grids.\n\n        Parameters\n        ----------\n        player : int\n            Determines which player's grids to print. Zero-indexed.\n\n        Returns\n        -------\n        str\n            Same as the string that is printed.\n        "
    characters = (('.' + letters) + '*0#')
    self.update_board(player)
    if (player == 0):
        board = self.p1_grid
        board_2 = self.p1_grid_2
    else:
        board = self.p2_grid
        board_2 = self.p2_grid_2
    result = (((('    +' + ('-' * ((self.width * 2) + 1))) + '+') + ('-' * ((self.width * 2) + 1))) + '+\n')
    result += (((('    |' + 'Your Board'.center(((self.width * 2) + 1))) + '|') + 'Enemy Board'.center(((self.width * 2) + 1))) + '|\n')
    result += (((('    +' + ('-' * ((self.width * 2) + 1))) + '+') + ('-' * ((self.width * 2) + 1))) + '+\n')
    if (self.width > 9):
        result += (((('    | ' + ' '.join([str((x + 1)).rjust(2)[0] for x in range(self.width)])) + ' | ') + ' '.join([str((x + 1)).rjust(2)[0] for x in range(self.width)])) + ' |\n')
    result += (((('    | ' + ' '.join([str((x + 1)).rjust(2)[1] for x in range(self.width)])) + ' | ') + ' '.join([str((x + 1)).rjust(2)[1] for x in range(self.width)])) + ' |\n')
    result += (((('+---+' + ('-' * ((self.width * 2) + 1))) + '+') + ('-' * ((self.width * 2) + 1))) + '+\n')
    for i in range(self.height):
        result += (((((('| ' + letters[i]) + ' | ') + ' '.join([characters[x] for x in board[i]])) + ' | ') + ' '.join([characters[x] for x in board_2[i]])) + ' |\n')
    result += (((('+---+' + ('-' * ((self.width * 2) + 1))) + '+') + ('-' * ((self.width * 2) + 1))) + '+')
    print(result)
    return result