jonnify·codemojex /codemojex/rooms-and-modes

Codemojex · chapter C2

Rooms, modes, and the secret.

A room is a template; a game is one playthrough inside it. When the first player joins a waiting room, the room’s emoji set and properties are snapshotted onto a fresh game, a secret of six distinct codes is drawn from the game’s own keyboard, and the timer begins. The modes are policy — one Mastermind engine, three configurations that branch only the edges.

Grounding — Codemojex.Rooms · Codemojex.EmojiSet · the room/emoji_set/game schemas · the design §The engine / §The data model.

The snapshot — a room’s props freeze onto a game at start_game/3
ROM · room template GAM · one game (frozen at start) type type + 4 policy columns emojiset emojiset + cell_codes + secret duration_ms ends_ms (derived) guess_fee guess_fee (copied) payout_split payout_split (copied)
type → the four policy columns feedback · scoring · settlement · economy, resolved by Rooms.policies_for/2 and snapshotted onto the game. scoring is linear in every mode.

Every prop is copied at start and is immutable for the game’s life — a game in flight is unaffected by a later edit to its room.

§1

The chapter

three dives

The room configures; the game freezes and plays. The first dive reads the template and the policy function; the second is the keyboard the secret is drawn from; the third is the secret itself and the commitment that makes a blind game checkable.

Grounding — rooms.ex, emoji_set.ex, the room/emoji_set/game schemas, and the rooms-and-games · emoji-codes · golden-blind stories (the acceptance catalog).

§2

References

sources · related

Sources

Related