On second thought it might be better to limit cancellation of the
premove to up-clicks on the premove from-square. (Presumably this
will be a static click, but if the down-click was elsewhere, a new move
most have been entered, which would clear the existing premove anyway.)
This allows the user to already grab another piece that he wants to move
after premove, or when premove is rejected.
|| x == BOARD_RGHT+1 && y >= gameInfo.holdingsSize) )
return;
- if(gotPremove && clickType == Press) { // user starts something after premove has been entered: abort premove as side effect
+ if(gotPremove && x == premoveFromX && y == premoveFromY && clickType == Release) {
+ // could be static click on premove from-square: abort premove
gotPremove = 0;
ClearPremoveHighlights();
}