Class: BefungeInterpreterAnimation

Inherits:
BefungeInterpreter show all
Defined in:
lib/befunge_interpreter.rb

Overview

Use this class for animation mode

Constant Summary

Constants included from Operations

Operations::DIRECTIONS, Operations::DIRECTIONS_MAP, Operations::DIRECTION_OPS, Operations::MATH_OPS, Operations::OPERATORS, Operations::OPERATORS_MAP

Instance Method Summary collapse

Methods inherited from BefungeInterpreter

#initialize

Methods included from Operations

#change_dir, #duplicate_stack_top, #end_program, #get_call, #get_user_input_char, #get_user_input_int, #greater_than, #left_right, #logical_not, #operate!, #pop_and_discard, #pop_and_display_char, #pop_and_display_int, #push_ascii_value, #push_num, #put_call, #rand_direction, #string_mode, #swap_stack_top, #trampoline, #up_down

Constructor Details

This class inherits a constructor from BefungeInterpreter

Instance Method Details

#interpretObject



81
82
83
84
85
86
87
88
# File 'lib/befunge_interpreter.rb', line 81

def interpret
  print_status
  while @computing
    sleep 0.1
    operate_and_step
    print_status
  end
end