Compare commits

..
Author SHA1 Message Date
devadmin ee8a4f27d3 Merge pull request 'Release: Meowdoku refinements and Scorekeeper name memory' (#18) from dev into main
Build and Release APK / Build APK and publish release (push) Successful in 4m27s
Build and Release APK / Deploy to Cloudflare Pages (push) Successful in 39s
2026-10-26 10:55:04 -06:00
devadmin 518f80b998 Merge pull request 'Release: dev to main (Cities & Knights)' (#9) from dev into main
Build and Release APK / Build APK and publish release (push) Successful in 4m2s
Build and Release APK / Deploy to Cloudflare Pages (push) Successful in 32s
2026-10-17 12:43:30 -06:00
devadmin 5fdb70cae0 Merge pull request 'Release: dev to main' (#7) from dev into main
Build and Release APK / Build APK and publish release (push) Successful in 4m1s
Build and Release APK / Deploy to Cloudflare Pages (push) Successful in 33s
2026-10-15 18:01:36 -06:00
2 changed files with 36 additions and 23 deletions
@@ -362,7 +362,12 @@ 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.",
available = true, // Engine and screen exist but have not been verified on two real
// 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,
@@ -373,7 +378,8 @@ 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 = true, available = false,
devPreview = true,
), ),
) )
@@ -106,33 +106,42 @@ class CatalogTest {
} }
@Test @Test
fun `every game in the catalogue can be played`() { fun `every reference game in the catalogue can be played`() {
// `available` is the release gate. Nothing is held back at the moment, // Every game the app ships is playable. The exceptions are the games
// so a production menu lists every game; a game parked behind the gate // whose engine and screen exist but have not been verified on a real
// belongs in `devPreview`, and must say so rather than being quietly // device yet: they are marked as previews so a production build keeps
// unavailable everywhere. // them out while a dev one can open them. `available = false` is what
GameCatalog.all.filterNot { it.available }.forEach { game -> // keeps an unverified game out of a production build while leaving it
assertTrue("${game.id} is unavailable but not a dev preview", game.devPreview) // visible on a dev one.
} assertEquals(
GameMenu.entries.forEach { menu -> listOf(GameCatalog.CATAN, GameCatalog.MEOWDOKU),
val held = GameCatalog.inMenu(menu, includeComingSoon = true) - GameCatalog.all.filterNot { it.available }.map { it.id },
GameCatalog.inMenu(menu, includeComingSoon = false).toSet() )
held.forEach { assertTrue("${it.id} hidden from production without a preview flag", it.devPreview) } // It is also the only difference the two channels see in a menu.
} // 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`() {
GameCatalog.all.filter { it.devPreview }.forEach { game -> // Katan until its two-device play is verified; Meowdoku until its board
// 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))
@@ -177,8 +186,6 @@ 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(),
) )