The Initialized State
Let’s start with the first state—initialized.
We'll cover the following...
We'll cover the following...
:initialized
When we’re in the :initialized state, the only permissible action is adding the second player. We’re going to focus on adding the second player and the transition it triggers from :initialized to :players_set.
We’ll need a check/2 clause that adds this combination of the state and the event to the whitelist.
When we’re in the :initialized state, it’s okay to add a new player, and when that action happens, we should
transition the state to :players_set ...