To run this program
- Clone the repo
- Navigate to clonned folder
- Run
irb
command - Once irb open, run
require_relative './galactic_space_craft'
to load the program - run
spacecraft = GalacticSpaceCraft.new([0, 0, 0], 'N')
to initialize class with constructor - run
spacecraft.execute_commands(['f', 'r', 'u', 'b', 'l'])
to excute commands. it will return final output in hash formate. in hash final position and direction will be there after executing given commands. - for running unit test cases, run
ruby test/test_galactic_space_craft.rb
from clonned folder