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

Atomic: Draw on insufficient winning material when flagging. #334

Closed
Happy0 opened this issue Feb 25, 2015 · 2 comments
Closed

Atomic: Draw on insufficient winning material when flagging. #334

Happy0 opened this issue Feb 25, 2015 · 2 comments
Assignees

Comments

@Happy0
Copy link
Contributor

Happy0 commented Feb 25, 2015

When a player flags on time in atomic chess, if their opponent does not having sufficient material to win, the game should be drawn.

Raised in: https://en.lichess.org/forum/general-chess-discussion/atomic-chess-endings?page=1

@Happy0 Happy0 added the bug label Feb 25, 2015
@Happy0 Happy0 self-assigned this Feb 25, 2015
@Happy0 Happy0 changed the title Atomic: Draw on insufficient winning material when opponent flags. Atomic: Draw on insufficient winning material when flagging. Feb 25, 2015
@ornicar
Copy link
Collaborator

ornicar commented Mar 3, 2015

@Happy0
Copy link
Contributor Author

Happy0 commented Mar 6, 2015

I don't think so. I think that would result in a draw before the guy capable of winning flagged on his clock due to these two lines:

https://github.com/ornicar/scalachess/blob/master/src/main/scala/Situation.scala#L29

https://github.com/ornicar/scalachess/blob/master/src/main/scala/Board.scala#L112

Now that you've drew attention to that, I've realised I should probably determine insufficient winning material polymorphically for variants rather than doing this:
https://github.com/ornicar/scalachess/blob/master/src/main/scala/variant/Atomic.scala#L119

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

3 participants