You might remember me as the author of Joy of Elixir: https://elixirforum.com/t/joy-of-elixir-self-published-free/
I’ve got a new book out which shows you how to do the Toy Robot exercise in Elixir:
The first 6 chapters of the book cover how to solve the common part of the exercise. Chapter 7 (coming soon) covers processes and supervision trees while building the foundations of a multiplayer Toy Robot game. Chapter 8 will finish that game.
I view this book as a “sequel” to things like Joy of Elixir, the getting started docs for Elixir or Elixir School. It’s a real (enough) project with real problems and I hope people enjoy reading it and following along.
Let me know what you think in this thread!
Table of Contents
- Introducing the Toy Robot
- Simplifying the problem
- Creating the application
- The MOVE command
- Moving west
- Moving north and south
- Moving in the right direction
- Turn left!
- Turn right!
- Catching bugs
- Finding the bugs within
- Regression testing the turn_right function
- Regression testing the move function
- Regression testing the move_west function
- Regression testing the move_north and move_south functions
- Jumping back to the manual test
- Placing the robot on a table
- The Table module
- The missing link
- Building our simulation
- Moving a robot, within a simulation
- Turning a robot, within a simulation
- Reporting the robot’s position
- Reading and handling commands
- The Command Processor
- The Command Handler
- The Command Runner
- Piecing it all together
- Building the CLI
- Reading commands from a file
- Verifying the robot’s behaviour
- The Toy Robot Game
- Building a game
- A single player game
- Let it crash!
- The Game Server