-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Add explanation for draw claims by insufficient material. #17114
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
Add explanation for draw claims by insufficient material. #17114
Conversation
| return `${i18n.site.fiftyMovesWithoutProgress} • ${i18n.site.draw}`; | ||
| if (d.game.threefold) return `${i18n.site.threefoldRepetition} • ${i18n.site.draw}`; | ||
| if (insufficientMaterial(d.game.variant.key, d.game.fen)) | ||
| return `${i18n.site.insufficientMaterial} • ${i18n.site.draw}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like we already have a reusable translation there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ornicar Updated to use it, but having 'Draw claimed' as well avoids confusion (since in the other cases the draw is automatic).
ui/game/src/view/status.ts
Outdated
| return `${i18n.site.insufficientMaterial} • ${i18n.site.draw}`; | ||
| if (d.game.drawOffers?.some(turn => turn >= d.game.turns)) return i18n.site.drawByMutualAgreement; | ||
| return i18n.site.draw; | ||
| return i18n.site.drawClaimedByInsufficientMaterial; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we sure the only way to reach this default case is through insufficient material claim?
Closes #17088.
This works if the only possibility left for a draw at that point in the code is the claim by insufficient material - should be the case, but not 100% sure. Are there any cases where lichess just says "Draw" (besides what this PR fixes)?