Commit ab0718b
Changed files (3)
lib/console.rb
@@ -1,6 +1,6 @@
-require 'navigate_rover'
-require 'command_processor'
-require 'interceptor'
+Dir[File.dirname(__FILE__) + "/**/*.rb"].each do |file|
+ require file
+end
class Console
def initialize(input, output, processor = CommandProcessor.new)
lib/rover_commands.rb
@@ -0,0 +1,15 @@
+class RCommand
+ def run(rover)
+ rover.rotate(90)
+ end
+end
+class LCommand
+ def run(rover)
+ rover.rotate(-90)
+ end
+end
+class MCommand
+ def run(rover)
+ rover.drive
+ end
+end