Restore the Katan catalogue entry the engine depends on
CI / Build and check (pull_request) Successful in 13m46s
CI / Deploy to Cloudflare Pages (pull_request) Skipped

The Option 2 migration dropped Gitea's 5c797c8, which added GameCatalog.CATAN
and a Katan entry (available = false: Coming soon on dev, hidden from
production). CatanRules.kt references GameCatalog.CATAN, so the merge did not
compile without it. Taken verbatim from feature/catan-engine, with the
matching CatalogTest assertions.

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 20:55:38 +00:00
parent 653e7a17a3
commit fb59372802
2 changed files with 31 additions and 9 deletions
@@ -106,17 +106,19 @@ class CatalogTest {
}
@Test
fun `every game in the catalogue can be played`() {
// There is nothing left marked "coming soon". The machinery that hides
// unfinished games from a production build is still there and still
// tested above — it simply has nothing to hide at the moment, and this
// is what will fail the day something is added to the list before its
// engine is written.
assertTrue(GameCatalog.all.all { it.available })
fun `every reference game in the catalogue can be played`() {
// Every game the app ships is playable. The one exception is Katan,
// listed so the slot exists and marked *Coming soon* until its engine
// and screen land — `available = false` is what keeps an unfinished
// game out of a production build while leaving it visible on a dev one.
assertEquals(
GameCatalog.inMenu(GameMenu.BOARD, includeComingSoon = false),
GameCatalog.inMenu(GameMenu.BOARD, includeComingSoon = true),
listOf(GameCatalog.CATAN),
GameCatalog.all.filterNot { it.available }.map { it.id },
)
// It is also the only difference the two channels see in a menu.
val hiddenFromProduction = GameCatalog.inMenu(GameMenu.BOARD, includeComingSoon = true) -
GameCatalog.inMenu(GameMenu.BOARD, includeComingSoon = false)
assertEquals(listOf(GameCatalog.byId(GameCatalog.CATAN)!!), hiddenFromProduction)
}
@Test