From: H.G.Muller Date: Sun, 5 Apr 2020 21:01:25 +0000 (+0200) Subject: Prevent empty squares on holdings rank in Edit Position X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=cfb7f508c04a56b6c3c15acf1a1042908ec1394e;p=xboard.git Prevent empty squares on holdings rank in Edit Position When a piece is moved away from the gating rank in holdingless Seirawan, the evacuated square is now automatically blacked out. --- diff --git a/backend.c b/backend.c index f49b273..aff8ada 100644 --- a/backend.c +++ b/backend.c @@ -7222,6 +7222,8 @@ UserMoveEvent (int fromX, int fromY, int toX, int toY, int promoChar) if(boards[0][fromY][BOARD_WIDTH-2]) boards[0][fromY][BOARD_WIDTH-2]--; if(boards[0][fromY][BOARD_WIDTH-2] == 0) boards[0][fromY][BOARD_WIDTH-1] = EmptySquare; } + } else if(gameInfo.variant == VariantSChess && !gameInfo.holdingsSize && gatingPiece == EmptySquare && (fromY == 0 || fromY == BOARD_HEIGHT-1)) { + boards[0][fromY][fromX] = DarkSquare; // empty on gating rank -> dark } else boards[0][fromY][fromX] = gatingPiece; ClearHighlights();