X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=3d9f02073661635b6a04aa7665826eb659286114;hb=00360e226b6c74d58365901e8cc5941a5ec9ff11;hp=9d659e251dad4b699f4bef8331162ed1b0b3c6c1;hpb=31806343176bad28a8ac91ab33bc15a4db8bed7f;p=xboard.git diff --git a/backend.c b/backend.c index 9d659e2..3d9f020 100644 --- a/backend.c +++ b/backend.c @@ -413,6 +413,11 @@ PosFlags (index) case VariantGrand: flags &= ~F_ALL_CASTLE_OK; break; + case VariantChu: + case VariantChuChess: + case VariantLion: + flags |= F_NULL_MOVE; + break; default: break; } @@ -15289,7 +15294,8 @@ ClockClick (int which) if (gameMode == EditPosition || gameMode == IcsExamining) { if(!appData.pieceMenu && blackPlaysFirst) EditPositionMenuEvent(ClearBoard, 0, 0); SetBlackToPlayEvent(); - } else if ((gameMode == AnalyzeMode || gameMode == EditGame) && !blackFlag && WhiteOnMove(currentMove)) { + } else if ((gameMode == AnalyzeMode || gameMode == EditGame || + gameMode == MachinePlaysBlack && PosFlags(0) & F_NULL_MOVE && !blackFlag) && WhiteOnMove(currentMove)) { UserMoveEvent((int)EmptySquare, DROP_RANK, 0, 0, 0); // [HGM] multi-move: if not out of time, enters null move } else if (shiftKey) { AdjustClock(which, -1); @@ -15301,7 +15307,8 @@ ClockClick (int which) if (gameMode == EditPosition || gameMode == IcsExamining) { if(!appData.pieceMenu && !blackPlaysFirst) EditPositionMenuEvent(ClearBoard, 0, 0); SetWhiteToPlayEvent(); - } else if ((gameMode == AnalyzeMode || gameMode == EditGame) && !whiteFlag && !WhiteOnMove(currentMove)) { + } else if ((gameMode == AnalyzeMode || gameMode == EditGame || + gameMode == MachinePlaysWhite && PosFlags(0) & F_NULL_MOVE && !whiteFlag) && !WhiteOnMove(currentMove)) { UserMoveEvent((int)EmptySquare, DROP_RANK, 0, 0, 0); // [HGM] multi-move } else if (shiftKey) { AdjustClock(which, -1);