monop-board/README.md

41 lines
1.2 KiB
Markdown
Raw Normal View History

# monop-board
A Monopoly board viewer for IRC games played with [monop-irc](https://github.com/thlc/monop-irc).
## Components
### IRC Bot (`bot/`)
Python bot that joins an IRC channel, watches for monop-irc game output, parses it, and writes the game state to `game-state.json`.
### Board Viewer (`site/`)
Single-file HTML/CSS/JS static site that reads `game-state.json` and renders a visual Monopoly board with player positions, property ownership, houses/hotels, and a game log. Auto-refreshes every 2 seconds.
## Quick Start
```bash
# 1. Configure the bot
cp bot/config.json bot/config.local.json
# Edit config with your IRC server/channel details
# 2. Install bot dependencies
pip install -r bot/requirements.txt
# 3. Start the bot
cd bot && python3 monopbot.py
# 4. Serve the board viewer
cd site && python3 -m http.server 8080
# Open http://localhost:8080
```
## How It Works
1. monop-irc runs in an IRC channel, outputting game text
2. The bot parses messages (rolls, movement, purchases, rent, jail, etc.)
3. Game state is written to `game-state.json` after each change
4. The board viewer polls the JSON file and renders the board
## License
BSD (matching the original bsdgames monop license)