Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawn positions not determined correctly (technically) #112

Open
probaddie opened this issue Apr 23, 2016 · 0 comments
Open

Drawn positions not determined correctly (technically) #112

probaddie opened this issue Apr 23, 2016 · 0 comments

Comments

@probaddie
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant