Files
ProLibertateGames/docs
adrianoftyrielandPaperclip 3a930f5423
CI / Build and check (pull_request) Failing after 8s
Katan rules engine + AI (WALA-119)
The island game as a pure-Kotlin state machine under game/catan/, wired to
the upstream GameRules / GameAi contract and fully unit-tested on the JVM.

- game/catan/: CatanModel (state, moves, phases), CatanBoard (19-hex
  geometry, seeded island generation with the 6/8 separation rule, shared
  vertex/edge graph), CatanRules (setup, production, the seven and the
  robber, domestic and maritime trade, building, development cards,
  Longest Road, Largest Army, win detection), CatanAi (a heuristic opponent
  that reads only public information).
- GameRules.isLegalMove: a defaulted structural legality check so a game
  with a combinatorial move space (Catan's trade offers) is gated the same
  way as one with an enumerated move list; MatchController uses it.
- GameCatalog.CATAN: the catalogue entry, listed but not yet available
  (descriptor and screen land with the screen task).
- Tests: 51 across CatanBoardTest, CatanRulesTest and CatanAiTest —
  geometry invariants, generation balance, setup, production, the
  seven/robber, both trade types, development-card timing, Longest Road
  edge cases, Largest Army, win detection, and AI games played to a result.
- docs/RULES-catan.md, in the per-game style, with the rule choices and
  the known gaps called out.

Two real engine bugs found and fixed while getting the suite green:
VERTEX_EDGES counted each shared edge once per adjacent hex, so an
interior vertex looked like it had six edges (which also double-counted
segments in the Longest Road search and duplicated setup moves); and the
applyRoll seven-transition was a discarded expression, so a seven never
left AWAIT_ROLL. Three test fixtures rolled from the PLAYING phase and two
assumed a two-seat rotation; corrected to the phases and seat order the
engine actually uses.

Verified: ./gradlew :app:testDebugUnitTest --offline — 679 tests, 0 failures.

Co-Authored-By: Paperclip <[email protected]>
2026-10-14 15:13:36 +00:00
..
2026-10-14 15:13:36 +00:00
2026-08-06 13:34:31 +00:00
2026-08-07 05:52:26 +00:00
2026-08-06 03:25:09 +00:00
2026-08-06 18:09:10 +00:00

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
Checkers RULES-checkers.md
Chess RULES-chess.md
Crazy 8s RULES-crazy8s.md
Cribbage RULES-cribbage.md
Euchre RULES-euchre.md
FreeCell — (TODO)
Golf RULES-golf.md
Hearts — (TODO)
Kaiser RULES-kaiser.md
Katan (catalogue id catan) RULES-catan.md
Klondike — (TODO)
Mastermind RULES-mastermind.md
Morris RULES-morris.md
Peg solitaire — (TODO)
Pirates RULES-pirates.md
President RULES-president.md
Pyramid — (TODO)
Sequence RULES-sequence.md
Spider — (TODO)
Ta Yü RULES-tayu.md
Wizard RULES-wizard.md
Yahtzee — (TODO)

Other docs

  • CI.md — build, CI, releases, OTA decisions.
  • 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 at the root.