Skip to content

Commit d0f48c6

Browse files
p-fruckantonplagemannpiuswalter
authored andcommitted
update missing documentation for is_fifty_moves()
Co-authored-by: Anton Plagemann <54081139+antonplagemann@users.noreply.github.com> Co-authored-by: Pius Walter <pius.walter@gmx.net>
1 parent 2bbf0b5 commit d0f48c6

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

chess/__init__.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2011,19 +2011,20 @@ def can_claim_draw(self) -> bool:
20112011
return self.can_claim_fifty_moves() or self.can_claim_threefold_repetition()
20122012

20132013
def is_fifty_moves(self) -> bool:
2014+
"""
2015+
Checks that the clock of halfmoves since the last capture or pawn move
2016+
is greater or equal to 100, and that no other means of ending the game
2017+
(like checkmate) take precedence.
2018+
"""
20142019
return self._is_halfmoves(100)
20152020

20162021
def can_claim_fifty_moves(self) -> bool:
20172022
"""
20182023
Checks if the player to move can claim a draw by the fifty-move rule.
20192024
2020-
:func:`~chess.Board.is_fifty_moves()` checks that the clock of
2021-
halfmoves since the last capture or pawn move is greater or equal
2022-
to 100, and that no other means of ending the game (like checkmate)
2023-
take precedence.
2024-
2025-
In addition, the fifty-move rule can also be claimed if there is a
2026-
legal move that achieves this condition.
2025+
In addition to :func:`~chess.Board.is_fifty_moves()`, the fifty-move
2026+
rule can also be claimed if there is a legal move that achieves this
2027+
condition.
20272028
"""
20282029
if self.is_fifty_moves():
20292030
return True

0 commit comments

Comments
 (0)