Screens for Yahtzee and Klondike, and both into the catalogue
Two engines that had been sitting behind ids now have screens, so they are tappable and playable. The Yahtzee card shows what the dice on the table would score in every box still open. That comparison is the whole of the decision, and doing the arithmetic by eye is not what anybody wants from a phone. A turn is two choices and the screen shows them together: which dice to keep before throwing again, and which box to write in when the throwing stops. Klondike plays tap-to-take then tap-to-put rather than by dragging. A drag across seven columns of overlapping cards on a phone is mostly a test of aim. Tapping a face-up card takes it and everything resting on it, so a run travels the way it would on a table. Which taps do anything is read off the legal moves the rules offer, so the screen never has to know why a move is allowed. Klondike deals again by rebuilding the controller, as peg solitaire does: a blocked deal is genuinely finished, so driveIdleSeats has already stopped and advanceIdle would never run. Yahtzee seats one to six, so it needed a case in seatCountFor. Without one the seat count falls through to the catalogue minimum, which is one now that solo play exists -- a two-handed game would have been dealt a single seat and the rules would have refused the table. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Urn6eEBA6XzrnfoibL7faC
This commit is contained in:
@@ -35,19 +35,9 @@ object GameCatalog {
|
||||
const val CRAZY_EIGHTS = "crazy8s"
|
||||
const val CRIBBAGE = "cribbage"
|
||||
|
||||
/**
|
||||
* Hearts has a rules engine and an AI but no screen yet, so it is an id
|
||||
* without a [GameDescriptor]: nothing to tap, and nothing to crash. It joins
|
||||
* [all] when its screen lands.
|
||||
*/
|
||||
const val HEARTS = "hearts"
|
||||
const val PEG_SOLITAIRE = "pegsolitaire"
|
||||
|
||||
/**
|
||||
* An id ahead of its screen: the engine is written and tested, but a
|
||||
* catalogue entry with nothing behind it would crash on the first tap, so it
|
||||
* joins [all] when its screen lands.
|
||||
*/
|
||||
const val YAHTZEE = "yahtzee"
|
||||
const val KLONDIKE = "klondike"
|
||||
const val SEQUENCE = "sequence"
|
||||
@@ -143,6 +133,17 @@ object GameCatalog {
|
||||
"of spades costs thirteen, and taking all of them costs everybody else.",
|
||||
available = true,
|
||||
),
|
||||
GameDescriptor(
|
||||
id = KLONDIKE,
|
||||
title = "Klondike",
|
||||
category = GameCategory.CARD,
|
||||
minPlayers = 1,
|
||||
maxPlayers = 1,
|
||||
teamBased = false,
|
||||
blurb = "Patience, as everyone means it. Seven columns down to the aces, " +
|
||||
"and a pack that decides most of it before you start.",
|
||||
available = true,
|
||||
),
|
||||
GameDescriptor(
|
||||
id = SEQUENCE,
|
||||
title = "Sequence",
|
||||
@@ -217,6 +218,17 @@ object GameCatalog {
|
||||
"take the one you passed, and try to finish with one standing.",
|
||||
available = true,
|
||||
),
|
||||
GameDescriptor(
|
||||
id = YAHTZEE,
|
||||
title = "Yahtzee",
|
||||
category = GameCategory.BOARD,
|
||||
minPlayers = 1,
|
||||
maxPlayers = 6,
|
||||
teamBased = false,
|
||||
blurb = "Five dice, three throws, thirteen boxes to fill. Every box can be " +
|
||||
"written in once, so the hard part is what to give up on.",
|
||||
available = true,
|
||||
),
|
||||
GameDescriptor(
|
||||
id = PIRATES,
|
||||
title = "Pirates and Bulgars",
|
||||
|
||||
Reference in New Issue
Block a user