Katan: playable screen, setup options, dev-preview catalogue gate
CI / Build and check (pull_request) Successful in 20m42s
CI / Deploy to Cloudflare Pages (pull_request) Skipped

Adds the Katan screen on top of the WALA-119 engine, built in separable layers
so the look, wording, layout and interaction can each be changed alone:

- CatanStyle: every colour and proportion (light/dark), via LocalCatanStyle
- CatanText: every word on screen (pure functions of state)
- CatanGeometry: lattice -> pixels and tap hit-testing (pure, unit-tested)
- CatanInteraction: what is tappable and what a tap means, derived only from the
  engine's legal-move list (pure, unit-tested)
- CatanBoardView / CatanPanels / CatanDialogs: stateless composables
- CatanScreen: wiring to MatchController, portrait and landscape layouts
- CatanPreviews: Android Studio previews of real positions
- docs/UI-catan.md: how to adapt each layer, rules of the road, known gaps

Wiring: PlayScreen branch, GameSetupScreen options (3-4 players, game to
5/8/10/12), and a GameDescriptor.devPreview flag so dev builds can open Katan
while production still hides it until two-device play is verified.

Tests: CatanGeometryTest, CatanInteractionTest, CatanTextTest, CatalogTest.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01JdMNbY5hLR7FjtfEE712xG
This commit is contained in:
Claude
2026-10-14 22:24:45 +00:00
parent a778e4732f
commit 30dcf026bd
21 changed files with 3366 additions and 18 deletions
+4 -6
View File
@@ -19,8 +19,7 @@ behaviour is pinned by `CatanBoardTest`, `CatanRulesTest` and `CatanAiTest`.
- **Points to win — *toggle*.** Defaults to 10. `CatanOptions.pointsToWin`, at
least 2. A lower target makes a test game short.
The setup screen that exposes these lands with the screen task; the engine reads
them from the table configuration today.
The setup screen exposes both (players: 3 or 4; game to 5, 8, 10 or 12 points).
## Board
@@ -291,10 +290,9 @@ timing rules; Longest Road and Largest Army worth five; victory at ten.
- **No player-to-player trade over the wire beyond accept/decline.** The engine
supports it; whether the UI surfaces it is the screen task's concern.
- **No trading away a development card.** Not part of the base game.
- **The setup screen is not part of this task.** `CatanOptions` (players, target
points) is read from the table configuration; the screen that sets it, and the
catalogue descriptor's `available` flag, land with the screen and verification
tasks.
- **The screen is built, not yet verified on two devices.** The Katan screen and
setup options exist (see [UI-catan.md](UI-catan.md)); the catalogue entry is a
dev-channel preview until two-device play has been verified.
- **The AI does not look ahead.** It scores one move deep with a fixed resource
valuation. It plays legally and plausibly; it is not a strong opponent, and no
strength claim is made.