currentMoveString[2] - AAA >= BOARD_RGHT ||\r
currentMoveString[0] - AAA < BOARD_LEFT ||\r
currentMoveString[2] - AAA < BOARD_LEFT )\r
- return 0;\r
+ return ImpossibleMove;\r
\r
piece = boards[yyboardindex]\r
[currentMoveString[1] - ONE][currentMoveString[0] - AAA];\r
currentMoveString[2] - AAA >= BOARD_RGHT ||\r
currentMoveString[0] - AAA < BOARD_LEFT ||\r
currentMoveString[2] - AAA < BOARD_LEFT )\r
- return 0;\r
+ return ImpossibleMove;\r
\r
result = LegalityTest(boards[yyboardindex],\r
PosFlags(yyboardindex)&~F_MANDATORY_CAPTURE, // [HGM] losers: might think we can e.p.!\r
cl.rtIn < 0 ||\r
cl.ffIn >= BOARD_RGHT ||\r
cl.ftIn < BOARD_LEFT )\r
- return 0;\r
+ return ImpossibleMove;\r
\r
if(c != '=' && c != '+' && c != NULLCHAR && CharToPiece(c) == EmptySquare)\r
return IllegalMove;\r
cl.ffIn < BOARD_LEFT ||\r
cl.ftIn >= BOARD_RGHT ||\r
cl.ftIn < BOARD_LEFT )\r
- return 0;\r
+ return ImpossibleMove;\r
\r
if(c != '=' && c != '+' && c != NULLCHAR && CharToPiece(c) == EmptySquare)\r
return IllegalMove;\r
currentMoveString[2] - AAA >= BOARD_RGHT ||\r
currentMoveString[0] - AAA < BOARD_LEFT ||\r
currentMoveString[2] - AAA < BOARD_LEFT )\r
- return 0;\r
+ return ImpossibleMove;\r
\r
if (gameInfo.variant == VariantXiangqi && /* [HGM] In Xiangqi rank stays same */\r
currentMoveString[0] != currentMoveString[2] ) {\r
cl.rtIn < 0 ||\r
cl.ftIn >= BOARD_RGHT ||\r
cl.ftIn < BOARD_LEFT )\r
- return 0;\r
+ return ImpossibleMove;\r
\r
Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);\r
\r
cl.rtIn < 0 ||\r
cl.ftIn >= BOARD_RGHT ||\r
cl.ftIn < BOARD_LEFT )\r
- return 0;\r
+ return ImpossibleMove;\r
\r
Disambiguate(boards[yyboardindex], PosFlags(yyboardindex), &cl);\r
\r
/* [HGM] do not allow values beyond board size */\r
if(currentMoveString[3] - ONE >= BOARD_HEIGHT ||\r
currentMoveString[2] - AAA >= BOARD_WIDTH )\r
- return 0;\r
+ return ImpossibleMove;\r
\r
if (WhiteOnMove(yyboardindex)) {\r
currentMoveString[0] = ToUpper(yytext[0]);\r