Commit graph

3 commits

Author SHA1 Message Date
7a4346a53f Fix trade race condition: move trade/roll decision to -- Command: handler
The root cause: checkpoint handler queued .trade via say_delayed, but
monop sends '-- Command:' before processing the trade. The old handler
reset in_trade and queued .roll, so both commands got sent.

Fix: checkpoint handler no longer sends commands. The -- Command:
prompt is where the bot decides to trade or roll, matching how monop
actually works (-- Command: is the interactive prompt).

Also: no trades while in jail (jail has no -- Command: before roll).

Updated all tests to reflect the new flow.
2026-02-21 10:55:33 +00:00
d31a09e754 Fix trade logic in player bots
- Handle 'Which player do you wish to trade with?' prompt when
  in_trade is True (was silently returning, causing bot to roll
  during an active trade prompt)
- Simplify property trade offers to always say 'done' (cash-only
  trades) to avoid getting stuck on property list prompts
2026-02-21 10:42:57 +00:00
7dadd1f37f Organize directory structure
- cardinal-plugin/ → plugins/ (matches Cardinal's plugin dir convention)
- index.html + game-state.json → site/
- OUTPUT_CATALOG.md → docs/
- Core Python files and tests stay flat (no import changes needed)
2026-02-21 10:16:49 +00:00