Files
Claude 2b492d24e8 feat(ui): HTML5 drag-and-drop + multi-select
Phase 1.3 — Card drag, Zone drop, multi-select wired through Board.

protocol:
- ZoneDef.dropMove + dropArgs (configures which move is called on drop)

engine:
- New DragTest game: 5 cards in hand, transferCards(cardIds, fromZone, toZone)
  move, table zone with dropMove='transferCards'
- exports map simplified to './games/*' (works for any future game file)

ui:
- Board: maintains selectedIds Set, passes to all zones; handles onDrop by
  looking up target zone's dropMove + dropArgs and calling props.onMove;
  clears selection after successful drop
- Zone: HTML5 dragover/drop handlers; visual highlight (yellow outline +
  bg tint) when card dragged over a drop target
- Card: dragstart writes { cardIds, fromZoneId } to dataTransfer via custom
  MIME 'application/x-tts-cards'; draggable guarded by locked; selected state
  shows yellow ring + lift; Shift/Ctrl/Meta click toggles selection

web:
- App.tsx: dropdown to switch between DragTest (drag verification) and War
  (rules verification); playerID defaults to '0' when null

Verified: pnpm -r ts clean, vite build (287 KB / 91 KB gzip), vite dev HTTP 200.
2026-08-16 23:33:13 +08:00
..
2026-08-16 23:25:03 +08:00