From cfb7f508c04a56b6c3c15acf1a1042908ec1394e Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 5 Apr 2020 23:01:25 +0200 Subject: [PATCH] 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. --- backend.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) 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(); -- 1.7.0.4