Skip to content

Instantly share code, notes, and snippets.

@GingerIndustries
Created May 15, 2022 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GingerIndustries/e148084ff345bddedc28d5ee5c42e1dd to your computer and use it in GitHub Desktop.
Save GingerIndustries/e148084ff345bddedc28d5ee5c42e1dd to your computer and use it in GitHub Desktop.

The first automaton starts in the top left, and immediately goes down and right into the ?, or if. The condition for the if is the e, or number input. Once input is given, the condition automaton jumps forwards and out of bounds, causing it to return its value. If that value is 0, or false, the first automaton turns left and goes into the top P, or print. The print spawns a new automaton going right, which jumps over the U-turn, goes left, into the n, or number. It reads the 0, turns up, does a U-turn, hits the semicolon (ending the number), and goes out of bounds, returning a 0 to the print. The first automaton then goes out of bounds and halts. However, if the value is 1, or true, the automaton turns right and proceeds directly into the n, gpes left read the 1, and halts. Then, the first automaton goes out if the print, into the U-turn, making it go back to the arrow to the left of the print, starting the whole cycle again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment