Playing the Game
Now, it’s finally time to have some fun! To play the game, as you may have guessed, all you have to do is dispatch commands, and then the machinery takes over. To see the simplest possible loop (your unicycle), you’ll submit the following commands:
-
Advance game loop (tick 1)—This sets up the game and advances it to an initial position.
-
Spawn site (required ticks 2)—This sets up a construction site that will take a total of 2 ticks to complete.
-
Advance loop (tick 2)—Work progresses on the construction site.
-
Advance loop (tick 3)—At this point, the construction site should magically become a building. You’ll be able to confirm that in a number of ways.
This is what the iex session looks like (some lines have been removed for ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access