From: H.G. Muller Date: Wed, 6 Jan 2010 15:56:02 +0000 (+0100) Subject: Implement castling for variant CRC X-Git-Tag: v4.4.3.20100118~9 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=1946a408d6f14119c91e6a088c7e60b32fd552d9;p=xboard.git Implement castling for variant CRC --- diff --git a/moves.c b/moves.c index 8ca57be..7835bc9 100644 --- a/moves.c +++ b/moves.c @@ -854,7 +854,7 @@ int GenLegal(board, flags, epfile, castlingRights, callback, closure) } } - if(gameInfo.variant == VariantFischeRandom) { + if(flags & F_FRC_TYPE_CASTLING) { /* generate all potential FRC castling moves (KxR), ignoring flags */ /* [HGM] test if the Rooks we find have castling rights */ diff --git a/parser.l b/parser.l index d96b95a..554c5eb 100755 --- a/parser.l +++ b/parser.l @@ -698,7 +698,7 @@ extern void CopyBoard P((Board to, Board from)); ft = BOARD_LEFT+2; } } - if(gameInfo.variant == VariantFischeRandom) { + if(PosFlags(0) & F_FRC_TYPE_CASTLING) { if (WhiteOnMove(yyboardindex)) { ff = initialRights[2]; ft = initialRights[1]; @@ -755,7 +755,7 @@ extern void CopyBoard P((Board to, Board from)); ft = BOARD_RGHT-2; } } - if(gameInfo.variant == VariantFischeRandom) { + if(PosFlags(0) & F_FRC_TYPE_CASTLING) { if (WhiteOnMove(yyboardindex)) { ff = initialRights[2]; ft = initialRights[0];