A game against the computer is kept as it is played (the host's true state plus its table config, one file per game) and can be resumed from the main menu or the game's setup screen. Leaving keeps the position; End game discards it; a finished game is not kept; a networked table is not saved. MatchController gains restore() and an onHostState listener; MatchSaver writes off the main thread and flushes on leaving and ON_STOP. Tests cover the store, the saver, resuming, and a save/resume round trip of every game in the catalogue at every move. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016eTor2tpxKb4dXbd8RqnvZ
52 lines
2.2 KiB
Markdown
52 lines
2.2 KiB
Markdown
# docs/
|
|
|
|
Conventions for this repo's documentation. Seeded at bootstrap (WALA-118).
|
|
|
|
## Per-game rules: `RULES-<game>.md`
|
|
|
|
Every game in `GameCatalog` gets one file describing how *this app* implements
|
|
it — not a generic rule dump. The rules code
|
|
(`app/src/main/java/org/prolibertate/games/game/<game>/`) is the source of
|
|
truth; the doc exists so a human or an agent can check intent against
|
|
behaviour without reading Kotlin first.
|
|
|
|
Naming: the catalogue id, lowercase, e.g. `crazy8s` → `RULES-crazy8s.md`.
|
|
|
|
| Game (catalogue id) | Rules doc |
|
|
| --- | --- |
|
|
| Backgammon | [RULES-backgammon.md](RULES-backgammon.md) |
|
|
| Checkers | [RULES-checkers.md](RULES-checkers.md) |
|
|
| Chess | [RULES-chess.md](RULES-chess.md) |
|
|
| Crazy 8s | [RULES-crazy8s.md](RULES-crazy8s.md) |
|
|
| Cribbage | [RULES-cribbage.md](RULES-cribbage.md) |
|
|
| Euchre | [RULES-euchre.md](RULES-euchre.md) |
|
|
| FreeCell | — (TODO) |
|
|
| Golf | [RULES-golf.md](RULES-golf.md) |
|
|
| Hearts | — (TODO) |
|
|
| Kaiser | [RULES-kaiser.md](RULES-kaiser.md) |
|
|
| Katan (catalogue id `catan`) | [RULES-catan.md](RULES-catan.md) — and its expansion rule set, [RULES-catan-ck.md](RULES-catan-ck.md) |
|
|
| Klondike | — (TODO) |
|
|
| Mastermind | [RULES-mastermind.md](RULES-mastermind.md) |
|
|
| Morris | [RULES-morris.md](RULES-morris.md) |
|
|
| Peg solitaire | — (TODO) |
|
|
| Pirates | [RULES-pirates.md](RULES-pirates.md) |
|
|
| President | [RULES-president.md](RULES-president.md) |
|
|
| Pyramid | — (TODO) |
|
|
| Sequence | [RULES-sequence.md](RULES-sequence.md) |
|
|
| Spider | — (TODO) |
|
|
| Ta Yü | [RULES-tayu.md](RULES-tayu.md) |
|
|
| Wizard | [RULES-wizard.md](RULES-wizard.md) |
|
|
| Yahtzee | — (TODO) |
|
|
|
|
## Other docs
|
|
|
|
- Build, CI, releases and OTA are described in the CI section of the root
|
|
[README](../README.md).
|
|
- [SAVED-GAMES.md](SAVED-GAMES.md) — how a game in progress is kept between sessions, and what is
|
|
not kept.
|
|
- [UI-catan.md](UI-catan.md) — how the Katan screen is layered, and how to restyle,
|
|
re-copy or re-lay-out it without touching the rules.
|
|
- `licenses/` — third-party licences that must travel with the app
|
|
(Uncial Antiqua under the SIL OFL; the app itself is GPL-3.0, see `/LICENSE`).
|
|
- Repo-level agent notes live in [`CLAUDE.md`](../CLAUDE.md) at the root.
|