From 43a9eda479942200b5918413599011b86420995e Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 4 Nov 2011 21:48:24 +0100 Subject: [PATCH] Change default sweep-promotion choicein queenless variants The initial scanning of the sweep piece until a defined piece is found is now in the increasing direction (still starting at Queen), so that the fairy pieces are suggested before R, B and N. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 8d16cf5..2f71b5e 100644 --- a/backend.c +++ b/backend.c @@ -5136,7 +5136,7 @@ Sweep(int step) else if((int)promoSweep == -1) promoSweep = WhiteKing; else if(promoSweep == BlackPawn && step < 0) promoSweep = WhitePawn; else if(promoSweep == WhiteKing && step > 0) promoSweep = BlackKing; - if(!step) step = 1; + if(!step) step = -1; } while(PieceToChar(promoSweep) == '.' || PieceToChar(promoSweep) == '~' || promoSweep == pawn || appData.testLegality && (promoSweep == king || gameInfo.variant == VariantShogi && promoSweep != PROMOTED last && last != PROMOTED promoSweep && last != promoSweep)); -- 1.7.0.4