Game Over
Understand the details of the Game Over module.
We'll cover the following...
We'll cover the following...
The end state
State machines often, but not always, have an end state. This is a state from which we can’t transition. In Islands, we have an end state called :game_over
.
We won’t need any new check/2
clauses for the :game_over
state because there are no new actions to add to the whitelist. The catchall clause returns an error no matter what we try to do when the state is :game_over
.
At this point, we can see our state machine make it through all the states and try all the events.
New IEx session
Let’s start a new IEx session, get a new rules
struct, and make sure it’s in the ...