Method: Esolang::Interpreters::Boolfuck#run
- Defined in:
- lib/interpreters/boolfuck_interpreter.rb
#run ⇒ String
Executes the interpretation of the Boolfuck code.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/interpreters/boolfuck_interpreter.rb', line 23 def run while running? do case command when ',' then input_to_tape when ';' then tape_to_output_array when '>' then move_right when '<' then move_left when '+' then flip when '[' then loop_begin when ']' then loop_end end @code_pointer += 1 end translate_output_bits_to_chars end |