Release Katan and Meowdoku: open the production gate
CI / Build and check (pull_request) Successful in 8m43s
CI / Deploy to Cloudflare Pages (pull_request) Skipped

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01S8evMuUxrft6TQj6NdAoqQ
This commit is contained in:
Claude
2026-10-26 18:14:12 +00:00
parent 36ab518309
commit f93eba88e5
2 changed files with 23 additions and 36 deletions
@@ -362,12 +362,7 @@ object GameCatalog {
maxPlayers = 4, maxPlayers = 4,
teamBased = false, teamBased = false,
blurb = "Trade, build, and settle the island, in the base game or Cities & Knights.", blurb = "Trade, build, and settle the island, in the base game or Cities & Knights.",
// Engine and screen exist but have not been verified on two real available = true,
// devices yet. Dev builds can open it as a *Preview*; a production
// build does not list it. Flip `available` on, and `devPreview`
// off, once two-device play has been verified.
available = false,
devPreview = true,
), ),
GameDescriptor( GameDescriptor(
id = MEOWDOKU, id = MEOWDOKU,
@@ -378,8 +373,7 @@ object GameCatalog {
teamBased = false, teamBased = false,
blurb = "One cat in every row, column and colour, and no two touching. " + blurb = "One cat in every row, column and colour, and no two touching. " +
"Wrong taps cost a heart; the board only ever accepts a cat that belongs.", "Wrong taps cost a heart; the board only ever accepts a cat that belongs.",
available = false, available = true,
devPreview = true,
), ),
) )
@@ -106,42 +106,33 @@ class CatalogTest {
} }
@Test @Test
fun `every reference game in the catalogue can be played`() { fun `every game in the catalogue can be played`() {
// Every game the app ships is playable. The exceptions are the games // `available` is the release gate. Nothing is held back at the moment,
// whose engine and screen exist but have not been verified on a real // so a production menu lists every game; a game parked behind the gate
// device yet: they are marked as previews so a production build keeps // belongs in `devPreview`, and must say so rather than being quietly
// them out while a dev one can open them. `available = false` is what // unavailable everywhere.
// keeps an unverified game out of a production build while leaving it GameCatalog.all.filterNot { it.available }.forEach { game ->
// visible on a dev one. assertTrue("${game.id} is unavailable but not a dev preview", game.devPreview)
assertEquals( }
listOf(GameCatalog.CATAN, GameCatalog.MEOWDOKU), GameMenu.entries.forEach { menu ->
GameCatalog.all.filterNot { it.available }.map { it.id }, val held = GameCatalog.inMenu(menu, includeComingSoon = true) -
) GameCatalog.inMenu(menu, includeComingSoon = false).toSet()
// It is also the only difference the two channels see in a menu. held.forEach { assertTrue("${it.id} hidden from production without a preview flag", it.devPreview) }
// Katan sits under Board and Meowdoku under Solitaire, so the two }
// channels part ways in different sections.
val hiddenFromBoard = GameCatalog.inMenu(GameMenu.BOARD, includeComingSoon = true) -
GameCatalog.inMenu(GameMenu.BOARD, includeComingSoon = false)
assertEquals(listOf(GameCatalog.byId(GameCatalog.CATAN)!!), hiddenFromBoard)
val hiddenFromSolitaire = GameCatalog.inMenu(GameMenu.SOLITAIRE, includeComingSoon = true) -
GameCatalog.inMenu(GameMenu.SOLITAIRE, includeComingSoon = false)
assertEquals(listOf(GameCatalog.byId(GameCatalog.MEOWDOKU)!!), hiddenFromSolitaire)
} }
@Test @Test
fun `a preview game opens on a dev build and nowhere else`() { fun `a preview game opens on a dev build and nowhere else`() {
// Katan until its two-device play is verified; Meowdoku until its board GameCatalog.all.filter { it.devPreview }.forEach { game ->
// and hearts have been looked at on a real screen.
val preview = GameCatalog.all.filter { it.devPreview }
assertEquals(
setOf(GameCatalog.CATAN, GameCatalog.MEOWDOKU),
preview.map { it.id }.toSet(),
)
preview.forEach { game ->
assertFalse("${game.id}: preview is for games that are not yet available", game.available) assertFalse("${game.id}: preview is for games that are not yet available", game.available)
assertTrue("${game.id} should open on a dev build", game.playableIn(devBuild = true)) assertTrue("${game.id} should open on a dev build", game.playableIn(devBuild = true))
assertFalse("${game.id} must not open in production", game.playableIn(devBuild = false)) assertFalse("${game.id} must not open in production", game.playableIn(devBuild = false))
} }
// The two games that were once previews now open everywhere.
listOf(GameCatalog.CATAN, GameCatalog.MEOWDOKU).forEach { id ->
val game = GameCatalog.byId(id)!!
assertTrue("$id should open in production", game.playableIn(devBuild = false))
}
// An ordinary finished game opens everywhere. // An ordinary finished game opens everywhere.
val chess = GameCatalog.byId(GameCatalog.CHESS)!! val chess = GameCatalog.byId(GameCatalog.CHESS)!!
assertTrue(chess.playableIn(devBuild = true) && chess.playableIn(devBuild = false)) assertTrue(chess.playableIn(devBuild = true) && chess.playableIn(devBuild = false))
@@ -186,6 +177,8 @@ class CatalogTest {
GameCatalog.MASTERMIND, GameCatalog.MASTERMIND,
GameCatalog.BACKGAMMON, GameCatalog.BACKGAMMON,
GameCatalog.PIRATES, GameCatalog.PIRATES,
GameCatalog.CATAN,
GameCatalog.MEOWDOKU,
), ),
GameCatalog.playable.map { it.id }.toSet(), GameCatalog.playable.map { it.id }.toSet(),
) )