January 2018
Intermediate to advanced
220 pages
5h 5m
English
In Part 1, we’ll begin by defining the data structures and logic of the game in pure Elixir. We won’t use a database to store the game state, and we’ll define our domain elements with native Elixir data structures instead of ORM models.
We will bring in a finite state machine to manage state transitions—like switching from one player’s turn to the other, and moving from a game in progress to one player winning.
Building the game engine solely in Elixir solves a long-standing problem in web development, the tendency for framework code to completely entangle application logic so the two can’t be easily separated. Without that separation, it’s hard to reuse application logic in other contexts. As we build Islands, ...
Read now
Unlock full access