Game Phases: Enums as a Simple State Machine
In this lesson you'll learn to
- Student can define `shell_hunt_phase := enum{Lobby, Hunting, Celebration}`, store it in a var, switch behavior per phase, and attach data to phases (the state-machine arc's first rung).
Student can define shell_hunt_phase := enum{Lobby, Hunting, Celebration}, store it in a var, switch behavior per phase, and attach data to phases (the state-machine arc's first rung).
🧩 Your capstone piece: The LOBBY -> HUNTING -> CELEBRATION phase machine that gates every handler
Keep going — free
You've read the intro. The rest of this lesson — the worked example, the hands-on exercise, the quiz, and the recap — is free for members. Sign in to continue and track your progress.
New here? The whole Verse Basics track is free with a free account — sign in to start.
Sources
/guides/enum-with-data-pattern© Biloxi Studios Inc. — original Verse Island content.
Turn this into a guided course
Add Game Phases: Enums as a Simple State Machine to your free study plan — we'll suggest related pages and stitch the lot into one compile-checked, self-guided lesson with worked examples and quizzes.
🧭 The Keeper's log
Quest complete? Chart your next heading from the 🦩 South Shores (Free) expedition.