A dragged piece that would partly overshoot its destination into a square
with a marker would effectively protect that marker from erasing, when the
erasing was done before the piece was released, because redrawal after the
move only would draw the target square. (Unlike erasing, which forces a full
redraw.)
toX = x;
toY = y;
saveAnimate = appData.animate;
- MarkTargetSquares(1);
if (clickType == Press) {
if(gameMode == EditPosition && boards[currentMove][fromY][fromX] == EmptySquare) {
// must be Edit Position mode with empty-square selected
/* Don't animate move and drag both */
appData.animate = FALSE;
}
+ MarkTargetSquares(1);
// moves into holding are invalid for now (except in EditPosition, adapting to-square)
if(x >= 0 && x < BOARD_LEFT || x >= BOARD_RGHT) {