infinitechess.org
infinitechess.org copied to clipboard
Dragging pieces
Dragging the board is a new kind of user interaction in infinite chess vs 8x8 chess. It makes the familiar action of dragging pieces in online chess problematic. I tried several time to drag pieces in infinite chess before remembering that it didn't work like that, but perhaps it could!
We could introduce ways to explicitly choose "piece dragging" or "board dragging", like right clicking or holding down a particular key, but I expect most users won't bother with those.
I propose the following logic for handling "drag" interactions:
- if the board is already moving (e.g. it has remaining momentum from being dragged), then drag the board
- else if the click action was a right-click or CMD/CTRL was held, drag the board
- else if the cursor is not over a piece of the player's colour, drag the board
- else if the cursor is over multiple pieces (when zoomed far enough out), drag the board
- else drag the piece
This might need to go through several iterations if it's going to work, but what are initial thoughts?