Package-level declarations

The AppViewModel (navigation, celebrations, wiring) and the Match state machine.

Types

Link copied to clipboard
Link copied to clipboard
sealed interface Celebration

Something worth a full-screen moment.

Link copied to clipboard
class LudoController(scope: CoroutineScope, link: LudoLink, fx: (Sfx) -> Unit, onDuelWon: () -> Unit, onGameOver: (won: Boolean) -> Unit, random: Random = Random.Default)

Runs a Ludo table on this phone.

Link copied to clipboard
class Match(val config: MatchConfig, scope: CoroutineScope, host: MatchHost, aiDispatcher: CoroutineDispatcher = Dispatchers.Default, aiDelayMs: Long = 420, random: Random = Random.Default)

State for one sitting: a series of rounds between the same two seats, with a running session score. Rounds alternate who starts. Compose reads the fields directly.

Link copied to clipboard
data class MatchConfig(val mode: GameMode, val size: Int, val x: Seat, val o: Seat, val difficulty: Difficulty? = null)
Link copied to clipboard
interface MatchHost

Side effects the match needs, injected so it can be tested without Android.

Link copied to clipboard
enum Screen : Enum<Screen>
Link copied to clipboard
data class Seat(val player: PlayerRef, val kind: SeatKind)
Link copied to clipboard

Properties

Link copied to clipboard

Convenience: is the link currently hosting a table?