From a4f4013fc4895fac610acb76420926ef7b311a58 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Wed, 1 Jan 2020 20:00:32 +0100 Subject: [PATCH] Prevent gating candidates from moving in holdingless seirawan The move generator now ignores pieces on the extreme ranks when these are used as holdings. --- moves.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/moves.c b/moves.c index 5c708cd..726dfd2 100644 --- a/moves.c +++ b/moves.c @@ -757,10 +757,11 @@ GenPseudoLegal (Board board, int flags, MoveCallback callback, VOIDSTAR closure, int rf, ff; int i, j, d, s, fs, rs, rt, ft, m; int epfile = (signed char)board[EP_STATUS]; // [HGM] gamestate: extract ep status from board + int dead = (gameInfo.variant == VariantSChess && !gameInfo.holdingsSize ? 1 : 0); int promoRank = gameInfo.variant == VariantMakruk || gameInfo.variant == VariantGrand || gameInfo.variant == VariantChuChess ? 3 : 1; if(gameInfo.variant == VariantSChess && !gameInfo.holdingsSize) promoRank = 2; - for (rf = 0; rf < BOARD_HEIGHT; rf++) + for (rf = dead; rf < BOARD_HEIGHT - dead; rf++) for (ff = BOARD_LEFT; ff < BOARD_RGHT; ff++) { ChessSquare piece; -- 1.7.0.4