From 5dc87dcd0d60262efa7b5ce308b100371f72bc3d Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 28 Dec 2011 14:28:18 +0100 Subject: [PATCH] Fix illegal-move message on seirawan gating from gated pieces Entering a gating move hen an already-gated piece left the back rank as interpreted as a on-gating move, rather than rejected. This because gating moves with non-virgin pieces were interpreted as non-gating promotions. The test for true promotions is now done on piece type rather than virginity. --- fairymax.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fairymax.c b/fairymax.c index dfa3ea6..5106ae1 100644 --- a/fairymax.c +++ b/fairymax.c @@ -876,7 +876,7 @@ int main(int argc, char **argv) if(b[L] && (b[L]&16) == Side && w[b[L]&15] < 0) // capture own King: castling { i=K; K = L; L = i>L ? i-1 : i+2; } if(w[GT&15] < -1) pl[GT&31]++, J+=89729; // promotion to royal piece - if(b[K]&32) GT = 0; // non-virgin mover => true promotion rather than gating + if((b[K]&15) < 3) GT = 0; // Pawn => true promotion rather than gating if(D(Side,-I,I,Q,O,LL|S,3)!=I) { /* did have move syntax, but illegal move */ printf("Illegal move:%s\n", line); -- 1.7.0.4