monop-state/plugins
Jarvis ea99d36657 Add house buying/selling sub-parser with full integration
New file: house_parser.py — self-contained state machine for the interactive
house buy/sell dialog. Parses:
- Property prompts ('PropName (N): ') to capture current house count
- Player responses (how many to buy/sell)
- Auto-skipped prompts (hotel during buy, 0 houses during sell)
- Error retries ('spread too wide', 'too many')
- Confirmation ('Is that ok?' → y/n)

Returns a result dict with {action, changes: {sq_id: new_count}, cost}
when the dialog completes.

Integration: monop_parser feeds every line (bot + player) to HouseParser.
On result, applies house count changes to property_houses.

Tests:
- test_house_parser.py (18 tests): buy/sell basics, hotel, error retry,
  real log replay (lines 59, 354, 4386)
- test_parser_commands.py: 4 new integration tests (buy, sell, reject,
  real log verification)

This closes the last tracking gap — house counts are now accurate at
purchase time, not just when rent is later charged.
2026-02-21 19:43:03 +00:00
..
monop Add house buying/selling sub-parser with full integration 2026-02-21 19:43:03 +00:00
monop-player Organize directory structure 2026-02-21 10:16:49 +00:00
test_plugin.py Organize directory structure 2026-02-21 10:16:49 +00:00