From: H.G.Muller Date: Mon, 3 Nov 2014 20:59:09 +0000 (+0100) Subject: Allow creation of DarkSquares in EditPosition mode X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=15caae7fbe25f432679e809259a5bf57536a3f6a;p=xboard.git Allow creation of DarkSquares in EditPosition mode Dragging an EmptySquare off board will make it a DarkSquare. Dragging anything else off board (incl. DarkSquares) makes it empty, as before. --- diff --git a/backend.c b/backend.c index f7b8fd4..0b4ad84 100644 --- a/backend.c +++ b/backend.c @@ -6948,7 +6948,7 @@ UserMoveEvent(int fromX, int fromY, int toX, int toY, int promoChar) /* EditPosition, empty square, or different color piece; click-click move is possible */ if (toX == -2 || toY == -2) { - boards[0][fromY][fromX] = EmptySquare; + boards[0][fromY][fromX] = (boards[0][fromY][fromX] == EmptySquare ? DarkSquare : EmptySquare); DrawPosition(FALSE, boards[currentMove]); return; } else if (toX >= 0 && toY >= 0) {