Matthias Gemuh wrote:bob wrote:
No result is being sent. None. Nada. Just a simple draw offer that should turn into a claim after the move is parsed. Nothing more. Nothing less.
I hope you now see that you _are_ sending a result and that _before_ the game is over.
Matthias.
I send it at the _only_ point where I can safely send it. Again, with this position:
[D] 7k/8/8/1q6/6Q1/8/8/K7 w - - 0 1
You (black) have played 50 moves with no pawn push or capture. I have played 49 and it is my move. By FIDE rules, _any_ move I play that is not a pawn push (no pawns here) or a capture (no captures possible) leads to a position I can claim as a draw. I call the TD over and I say I am going to play the move Qh7+ and claim that is a draw by 50 move rule." He looks at the scoresheets, and agrees, and the game ends.
With your GUI, I first send the Qh7+, and then the draw claim (1/2-1/2). But before you have a chance to read my second line, you get an instant response from my opponent since he has only one legal move, and he plays Kxg7 and now this is not a draw. When you read my draw claim, you say "invalid" and cause me to lose. Here I am going to lose anyway, but this was a dead drawn game, by FIDE rule. Tell me how to fix that in your GUI and I'll do so. The only solution so far, has been to send the draw claim _first_ followed by the move. And if the GUI has any intelligence, it can figure out that the claim is for the position after the move (which is valid BTW) since it is not valid for the position _before_ the move.
Tell me how to fix this with your code.
Note also that I am allowed to claim a draw without moving at all, if the position meets the rule requirements. So a claim can legally come before or after the move, but while it is still my turn (according to FIDE rule). But I have no way to "retain the right to move" after I play a move with xboard protocol. Because announcing the move effectively ends my turn to play, unlike in human events.
How do I make this work in all cases with your code? I do not believe it is possible, as your code exists...