You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Laws state that at least one of the players must claim the draw whenever three-fold repetition occurs or the fifty-move rule may be invoked. In other words, a draw is not automatic whenever one of these conditions is met. This means that the game.game_over() and game.is_draw() methods cannot be relied on in serious applications. Furthermore, there is no way to determine through the API how many half moves have elapsed since the previous capture or pawn move.
My first inclination is to expose three new methods that abide by the strict interpretation of the Laws: game_over_strict(), in_draw_strict() and in_fifty_move_rule(). They would respect the following rules. (I omit the game object for brevity:)
Laws of Chess (Draws)
The Laws state that at least one of the players must claim the draw whenever three-fold repetition occurs or the fifty-move rule may be invoked. In other words, a draw is not automatic whenever one of these conditions is met. This means that the game.game_over() and game.is_draw() methods cannot be relied on in serious applications. Furthermore, there is no way to determine through the API how many half moves have elapsed since the previous capture or pawn move.
My first inclination is to expose three new methods that abide by the strict interpretation of the Laws: game_over_strict(), in_draw_strict() and in_fifty_move_rule(). They would respect the following rules. (I omit the game object for brevity:)
game_over_strict() === in_checkmate() || in_draw_strict()
in_draw_strict() === in_stalemate() || insufficient_material()
in_fifty_move_rule() === half_moves >= 100
I would be happy to hear any feedback.
The text was updated successfully, but these errors were encountered: