InputMapper tracks a mouse-down over a placed piece and promotes it to drag mode once the cursor travels past an 8px threshold. Legal drop cells (those where the piece's start→end vector still fits a legal placement) are highlighted in green. Releasing on a legal cell emits a RelocateRequested signal; Main feeds it to MovePieceCommand, which is already undoable via the existing history stack. Escape or releasing on an invalid cell cancels. The harness gains a relocate() helper so UI tests can script drag-and-drop moves without synthesizing motion events. |
||
|---|---|---|
| .. | ||
| Automation | ||
| Board | ||
| Input | ||
| Pieces | ||
| Presentation | ||
| UI | ||
| Main.cs | ||
| Main.cs.uid | ||