Guest User

Untitled

a guest
Nov 16th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.48 KB | None | 0 0
  1. Machine.defined_as(:simple) do
  2.   head_at_position(0).of Tape.with_blank_symbol("0").and_input_symbols("1") { "0" }
  3.  
  4.   in_state :A do
  5.     on "0" do
  6.       move_right
  7.       enter :B
  8.     end
  9.   end
  10.  
  11.   in_state :B do
  12.     on "0" do
  13.       write "1"
  14.       move_right
  15.       enter :C
  16.     end
  17.   end
  18.  
  19.   in_state :C do
  20.     on "0" do
  21.       move_right
  22.       enter :D
  23.     end
  24.   end
  25.  
  26.   in_state :D do
  27.     on "0" do
  28.       write "1"
  29.       move_right
  30.       enter :A
  31.     end
  32.   end
  33. end
Add Comment
Please, Sign In to add comment