@@ -449,10 +449,18 @@ class Info(enum.IntFlag):
449449@dataclasses .dataclass
450450class Opponent :
451451 """Used to store information about an engine's opponent."""
452+
452453 name : Optional [str ]
454+ """The name of the opponent."""
455+
453456 title : Optional [str ]
457+ """The opponent's title--for example, GM, IM, or BOT."""
458+
454459 rating : Optional [int ]
460+ """The opponent's ELO rating."""
461+
455462 is_engine : Optional [bool ]
463+ """Whether the opponent is a chess engine/computer program."""
456464
457465
458466class PovScore :
@@ -1158,7 +1166,7 @@ async def send_opponent_information(self, *, opponent: Optional[Opponent] = None
11581166 method should be called before the first move of a game--i.e., the
11591167 first call to :func:`chess.engine.Protocol.play()`.
11601168
1161- :param opponent: Optional. The opponent's information.
1169+ :param opponent: Optional. An instance of :class:`chess.engine.Opponent` that has the opponent's information.
11621170 :param engine_rating: Optional. This engine's own rating. Only used by XBoard engines.
11631171 """
11641172
@@ -1272,9 +1280,9 @@ async def send_game_result(self, board: chess.Board, winner: Optional[Color] = N
12721280 Sends the engine the result of the game.
12731281
12741282 XBoard engines receive the final moves and a line of the form
1275- " result <winner> {<ending>}" . The <winner> field is one of " 1-0" ,
1276- " 0-1", " 1/2-1/2" , or "*" to indicate white won, black won, draw,
1277- or adjournment, respectively. The <ending> field is a description
1283+ `` result <winner> {<ending>}`` . The `` <winner>`` field is one of `` 1-0`` ,
1284+ `` 0-1``, `` 1/2-1/2`` , or ``*`` to indicate white won, black won, draw,
1285+ or adjournment, respectively. The `` <ending>`` field is a description
12781286 of the specific reason for the end of the game: "White mates",
12791287 "Time forfeiture", "Stalemate", etc.
12801288
@@ -1284,9 +1292,10 @@ async def send_game_result(self, board: chess.Board, winner: Optional[Color] = N
12841292 :param board: The final state of the board.
12851293 :param winner: Optional. Specify the winner of the game. This is useful
12861294 if the result of the game is not evident from the board--e.g., time
1287- forfeiture or draw by agreement.
1295+ forfeiture or draw by agreement. If not ``None``, this parameter
1296+ overrides any winner derivable from the board.
12881297 :param game_ending: Optional. Text describing the reason for the game
1289- ending. Similarly to the winner paramter , this overrides any game
1298+ ending. Similarly to the winner parameter , this overrides any game
12901299 result derivable from the board.
12911300 :param game_complete: Optional. Whether the game reached completion.
12921301 """
0 commit comments