Wrapping Up

Get a brief introduction to what we've covered so far.

What we have learned so far

We’ve done a lot of great work in this chapter. We’ve built a state machine from scratch and encapsulated all the rules of Islands with a data structure and a handful of clauses for a single function.

Along the way, we learned a lot about finite state machines in general. We learned to map events to states to make decisions about behavior. We also learned to manage state and state transitions.

The implementation we came up with is completely decoupled from any other module we’ve written so far. It can decide whether actions follow the rules independently and without any knowledge of the application logic for the rest of the game.

Get ready for the next step

Now we’re ready to put all the work we’ve done so far together in a single entity, with a single interface. As we move into the next part of the course, we define a GenServer for the game. In it, we’ll get the application logic working together with the rules.

By the end of the next few lessons, Islands is going to take shape. It’s going to feel a lot more like a complete game. Let’s get to it!

Get hands-on with 1400+ tech skills courses.