-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
+Allow asking for draw after opponent asked (Closes #13138) #13182
Open
TheMadSword
wants to merge
1
commit into
lichess-org:master
Choose a base branch
from
TheMadSword:draw_allow_after_asked
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
isn't that new
lastDrawColor
superfluous? it seems it can be inferred from the existing values - highest ply of the 2 setsThere 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.
Hi,
If you want to limit at once per ply per player a draw request, then yes I could change it to do that.
I thought about using the Sets too at first, but then, just imagine,
On a ply "x" :
1- W offers draw, "x" is added to the white set. B decline the offer.
2- B offers draw, "x" is added to the black set. W decline the offer.
3- Who can now offer ? Because looking at the sets, you have no way of knowing [server-side] who offered last, since (the set maximums) are equals. How can we know which was last ? Then let's say we allow to offer when they are equals (max-ply-offer-W == max-ply-offer-B). Then we still don't have a way of knowing who did the last one server-side (and a player could be double-offering in a row). We could start modifying the sets to represent that it is as if a draw was not done for a player during a ply, but this would cause other problems down the line for sure (plus as the draw offers get normalized/annotated [another issue I created, they aren't always networked/visible when reloading #13183], and they would then be missing.
Imagine the scenario where the position is very complex. W sees it is drawish and offers a draw. B declines immediately. Then realized it is drawish and offers a draw. B then cancel as he thought he was wrong (OR W think he was wrong and decline the offer as he thought he was wrong initially). Then both people realized it's a draw. The game is now forced to progressed with two people wanting to draw. I am not sure this is wanted as explained via refering to the wiki in the issue.
It all comes down to whether we want to allow more than one draw offer per player per ply. I think allowing it gives greater freedom to the player with a not so high complexity.
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.
If we go this road, We should consider FIDE rule, that only allow offer the draw in your turn. But it also has some other special case I think.
But, if we don't want to do that (keep the current behavior), in case of both offer draw at a same Ply. We can make them wait til next ply in order to offer another draw. How does that sound?
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.
I'm good for whatever; I'd just want the official ruling ^^.
EDIT 27-08-2023 : Still awaiting the official ruling.
RE-EDIT 28-09-2023 : Still awaiting official ruling.
RE-RE-EDIT 23-11-2023 : Still awaiting official ruling.
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.
I prefer the this approach. It makes sense. keep the current behavior, and doesn't required big changes. So, I guess you can just go for it.