sje wrote:The main point of my complaint is that the program getting checkmated (or stalemated or whatever) never gets to see the move that ends the game. So its saved copy of the game will differ from that of its opponent. I'd like to think that adherence to FIDE rules means that both players come away from the table with the same scoresheets.
You are right, this is not as it should be. It is not related to the question if the mate adjudication should be on or off by default, though: even if it is on, the opponent has the right to see the move by which it was checkmated.
In the next release I will make sure the move is sent before the game is ended by a checkmate or stalemate adjudication. (I already had to fix a similar problem earlier, because the user did not get to see the final move on the display!)
I am not so sure if it is a good idea, though, to do this for all adjudications. Many engines have uninterruptable search. So if you send them he opponent move which brings a 3-fold repetition on the board, an then send them the move before sending a 'result' command, they start thinking on the replay. And the 'result' command then get simply queued in the pipe untill they produce the move, which can take several minutes at long TC. This then might cause the move to come in the next game (in match mode), where it will cause forfeit due to an illegal move, in engnes that do not support ping. (The current treatment of a resignation also causes this problem.)
Perhaps I should put the engine in force mode before sending it a move that will lead to adjudication!
The 'resign' problem is more tricky: many engines resign in the opponent's turn, after sending a move. If they do that, XBoard cannot know that they are going to resign at the time it gets the move, and will faithfully pass it on to the opponent, which will then start thinking. Then a resignation comes in. Perhaps I should only pass on such out-of-turn resignations only after the opponent has come up with its reply, when that opponent does not support ping. It seems a bit silly to wait for a move when the game is already finished (and would again lead to the games as seen by the two engines not being identical), but I am not sure what else I could do. The resigner will most likely not accept another move after it resigned... Perhap I should send 'force' + 'undo' to the engine doing the extra move, before sending it the RESULT command that informs it of the resignation. But not al engines implement 'undo'. (That would be their problem, though...) This is all awfully cumbersome, just to cater to engines that do not support ping (as every engine really should).