Commit Graph

1 Commits

Author SHA1 Message Date
Brian Fertig 684f5ed7b2 feat(monopoly): add complete trade system with AI evaluation and drag-and-drop UI
- Add trade logic to MonopolyLogic: isTradeable, validateTrade, applyTrade
  - Properties with buildings (or in groups with buildings) cannot be traded
  - Validates ownership, cash affordability, and player activity
  - Handles two-way cash flows and property ownership transfers

- Add AI trade evaluation to MonopolyAI: evaluateTrade
  - Scores offers based on cash delta, asset value, group control changes
  - Detects set completions and control crossings (past 50%)
  - Vets breaking up completed monopolies
  - Applies skill-based thresholds and randomness
  - Returns acceptance decision with human-readable reason

- Add trade modal UI to MonopolyGame
  - Three-column layout: your properties, give/get lanes, opponent properties
  - Drag-and-drop property cards into trade lanes
  - Cash steppers for adding/requesting cash
  - Opponent tabs to switch counterparty
  - Hover cards for detailed property info
  - Visual feedback: pulsing hints when offer is empty, accept/reject messages
  - "Initiate Trade" button in end-turn menu
2026-06-08 16:43:54 -06:00