From 15caae7fbe25f432679e809259a5bf57536a3f6a Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 3 Nov 2014 21:59:09 +0100 Subject: [PATCH] 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. --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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) { -- 1.7.0.4