Some xboard issues

Discussion of chess software programming and technical issues.

Moderator: Ras

User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Some xboard issues

Post by Evert »

hgm wrote:Negative from-rank is used to encode drop moves (where the from-file then holds the piece type). But in move disambiguation -1 is used to indicate a coordinate that was not given in the SAN.
There's a call "CheckTest(board, flags, -1, -1, -1, -1, FALSE)" in line 801 of moves.c. I suspect that's the culprit.
User avatar
hgm
Posts: 28441
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Some xboard issues

Post by hgm »

This could very well be the problem, and if it is, your proposed fix would be good. This call is to figure out if you are currently in check (for castling legality), rather than after the specified move. A -1 in to-square coordinates can recognize it. The negative from-square coordinate (DROPRANK) is another matter, and I might have confused the two cases when adapting the mate test to handle drop moves.