Codemojex · chapter C0
Overview — the whole game, at a glance.
Codemojex is a real-time, multiplayer code-breaking competition that runs as a Telegram Mini App — Mastermind played with an emoji keyboard, for money. This chapter opens the course the way the design opens the system: the game placed in its family, the engine that treats every mode as policy on the same branded entities, and the four-layer architecture one glance can hold. It is the shipped game (cm.1–cm.7) taught as-built.
Pick a mode below. The four policy cells change; the scoring cell does not.
linear in every row (the teal column) — the distance math is the invariant; only feedback, settlement, and economy fork. Source: Codemojex.Rooms.policies_for/2.Classic — feedback score, scoring linear, settlement live, economy winner_take_all. Every guess is scored and shown; on close the pool pays the max-score player winner-take-all.
The chapter in three dives
C0.1 – C0.3One code path scores every mode; one facade fronts every system; four layers hold the whole game. The three dives take those in turn — the family the game belongs to, the engine whose modes are policy, and the architecture at a glance.
The game and the family
A six-emoji secret, a guess, and a feedback function — the Mastermind family, over a code space of positions and symbols.
C0.2The engine and its policies
A generic engine: a GAM carries a type and four policies; the secret, guess, and distance math are one shared path.
The architecture at a glance
Four layers, each owning its tier: the thin surface, the facade and systems, the bus on Valkey, and the storage tiers.
Grounding — the chapter reads from lib/codemojex/game.ex (the Codemojex facade)
and lib/codemojex/rooms.ex (policies_for/2, the type→policy fork), the design’s opening
sections, and stories/rooms-and-games.stories.md.
References
sources · relatedSources
- Mastermind — the board gamethe guess-against-a-hidden-code loop Codemojex plays with emoji.
- King — Announcing Snowflake (2010)the time-ordered ids that key every branded entity across every tier.
Related
- BCS — the architecture lawthe identity and systems discipline this game is built to.
- BCS B7 — Codemojexthis game taught inside the BCS course; it doors back here.
- C1 — The Game as Branded Systemsthe identity law, next.