From 5a646e702ce280ec3dc5ef42a662a83b83e6e08c Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Fri, 13 Apr 2018 23:03:37 +0200 Subject: [PATCH] Fix Euro-Shogi holdings size Euro-Shogi doesn't just have the Shogi Knight as dummy piece, but also the Lance and Silver. (This to be able to use the piece definitions of normal Shogi.) As it was the Euro-Knight would never be dropped. --- dropper.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dropper.c b/dropper.c index 6efba7b..efe22c1 100644 --- a/dropper.c +++ b/dropper.c @@ -361,7 +361,7 @@ waDirs[] = { 40, 69, 97, 67, 67, 74, 59, 59, 73, 87, 57, 96, 116, 121, 135, 99, char chessIDs[] = "PNBRQ", shogiIDs[] = "PLSGBRN", -euroIDs[] = "PLSGBR?N", +euroIDs[] = "P..GBR.N", toriIDs[] = "SPLRCF", kyotoIDs[] = "PLSN............RTBG", // R, T, B, G are synonyms for +P, +L, +S and +N (written and recognized in drop moves) waIDs[] = "POULCMGDVWHSRFXE", @@ -540,7 +540,7 @@ GameInit (char *name) nrRanks = variants[v].ranks; zone = variants[v].zone; pieces = variants[v].pieces; - maxDrop = variants[v].hand - (pieces != euroIDs); // in Euro-Shogi the normal Shogi Knight is present as dummy (unused) piece + maxDrop = variants[v].hand; moves = variants[v].dirs; startPos= variants[v].fen; codes = variants[v].proms; @@ -555,7 +555,7 @@ GameInit (char *name) printf("\n"); } - maxDrop += (v==MINI_NR+1 || v==MINI_NR); // Judkins & mini-Shogi have dummy Lance + maxDrop += (v==MINI_NR+1 || v==MINI_NR) + 3*(pieces[1] == '.'); // Judkins & mini-Shogi have dummy Lance, Euro-Shogi dummy L, S and fN // board ClearBoard(); -- 1.7.0.4