Katan: Cities & Knights docs, knight menu for any own knight, tidier player card

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016eTor2tpxKb4dXbd8RqnvZ
This commit is contained in:
Claude
2026-10-17 14:40:49 +00:00
parent e344d1d817
commit c8368416c4
11 changed files with 328 additions and 15 deletions
+28
View File
@@ -120,6 +120,34 @@ and play a game on a dev build.
- The board has a content description but no per-hex semantics; a screen-reader
mode would need one.
## Cities & Knights on the screen
The same layers carry the expansion; the screen only adds pieces, and **none of them
decides what is legal** — each reads the engine's legal-move list.
| Layer | What it adds |
| --- | --- |
| `CatanStyle.kt` | commodity colours, a colour per improvement track, the wall and barbarian colours, the awake-knight halo |
| `CatanText.kt` | goods, track, knight and progress-card names and help text; the prompts for every chore |
| `CatanInteraction.kt` | `BuildKind.WALL` / `KNIGHT`; chore taps; the moving-knight and armed-card modes; `knightActions`, `progressHand`, `goodsBankTrades` |
| `CatanBoardView.kt` | shields for knights (strength dots; faded when asleep, white halo when awake), dashed walls, a pennant for each metropolis, the merchant coin, a faint robber until the first attack |
| `CatanPanels.kt` | commodity tiles in the hand, the barbarian strip, the yellow / red / event dice, the extra player-card lines, the Improve and Progress buttons |
| `CatanCkDialogs.kt` | goods picker (discard, wedding, harbour), improvements, progress cards, the knight menu, deck / aqueduct / spy / drop choices, goods trade |
| `CatanScreen.kt` | the visual state: knight menu, moving knight, armed card, and which chore dialog shows |
**Interaction model.** Tap one of your own knights (it gets a yellow ring when it can do
something) for its menu: wake, promote, move or chase the robber. *Move* arms the board
with the crossings the knight can reach. A progress card that needs a place on the board
(Engineer, Medicine, Merchant, Diplomat, Intrigue, Inventor) closes the dialog and
**arms** the board; the next tap plays it. Chores that are answered with a place — a city
to lose, a metropolis site, a driven knight's refuge, a free knight — light the crossings
on the board and the prompt line says what to tap; the others open a dialog that cannot
be dismissed, because the game is waiting on it.
**Testing.** `CatanCkInteractionTest` plays whole games and checks that for *every* legal
move at *every* position some control (a tap, a button or a dialog choice) produces it, so
a legal move with no way to make it — a stuck phone — fails the build.
## Status and known gaps
The screen is **playable and feature-complete for the engine's rules**, but is