Comments/Ratings for a Single Item
Can you give a specific example? Which piece was delivering the undetected check? And was it by moving the King itself, or by moving a pinned piece? In general the check detection seems to work, even in the highlighting. So I did not even manage to play a move that would put the King in check to see if they were accepted; they were not highlighted.
It's not that it is not detecting it, I think he means that it isn't reporting it. Other presets announce check but I'm not sure how they do it. I am looking at the chess include files and I don't see any code that does that.
It's not that it is not detecting it, I think he means that it isn't reporting it.
That is correct.
Other presets announce check but I'm not sure how they do it.
They do it with the say command. This displays a message on screen and also inserts it as an inline comment after a move. It is intended for short game-related messages.
Ah, I did not know presets where supposed to do that. Chess engines never do. Club players of orthodex Chess neither.
The automation already detects whether the new side-to-move is in check, as a short-cut for thesting legality of the move list it generates for highlighting. When in check, it retries the checking move in reply to every pseudo-legal move first, to test whether the check has been solved. (Which most moves of course don't do, and then you don't have to test anything else on those.) So all I have to do is issue a say command at that point. What exactly should I say? Just "check"? Or "Your King is in check"?
Should this also be done in games that do not have the checking rule (i.e. where it is legal to stay in check)?
[Edit] OK, it seems to work. At least when using the 'accelerated method' for legality testing of the highlights (which is the default), in games that have a checking rule. When each pseudo-legal move is tested for legality individually (by a full move generation of the opponent to detect King capture) it doesn't do it yet, as it does not test the legality of a null move (which it would have to do to detect checking). But this mode is practically unusable anyway, and should be 'phased out'.
I am also not sure whether the accelerated legality testing would work in games with multiple royals.
6 comments displayed
Permalink to the exact comments currently displayed.
While playing this game, I just tried some moves that should place the King in check, but it did not report that the King was in check.