Skip to content

Commit

Permalink
Correct documentation of send_game_result method
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkZH committed Jul 9, 2023
1 parent 885d59f commit a1f16f8
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions chess/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1251,10 +1251,15 @@ async def send_game_result(self, board: chess.Board, winner: Optional[Color] = N
"""
Sends the engine the result of the game.
UCI engines only recieve the final position of the board. XBoard engines
receive the final moves and a line of the form "result <winner> {<ending>}",
where <winner> is one of "1-0", "0-1", "1/2-1/2", or "*" to indicate white
won, black won, draw, or adjournment, respectively.
XBoard engines receive the final moves and a line of the form
"result <winner> {<ending>}". The <winner> field is one of "1-0",
"0-1", "1/2-1/2", or "*" to indicate white won, black won, draw,
or adjournment, respectively. The <ending> field is a description
of the specific reason for the end of the game: "White mates",
"Time forfeiture", "Stalemate", etc.
UCI engines do not expect end-of-game information and so are not
sent anything.
:param board: The final state of the board.
:param winner: Optional. Specify the winner of the game. This is useful
Expand Down

0 comments on commit a1f16f8

Please sign in to comment.