From: H.G. Muller Date: Fri, 4 Nov 2011 20:48:24 +0000 (+0100) Subject: Change default sweep-promotion choicein queenless variants X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=43a9eda479942200b5918413599011b86420995e;p=xboard.git 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. --- 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));