diff options
| author | mo k <mo@mokhan.ca> | 2012-11-19 14:03:36 -0700 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-11-19 14:03:36 -0700 |
| commit | bc99a1bf3dc232dcafa43876b255ad175efab727 (patch) | |
| tree | 8ee42474b23f0b29d59b0e4a93632c40bc24381c | |
| parent | e417ce2066da186b9c51de1e473904c98d8bbb8e (diff) | |
make rover extend Rotation module.
| -rw-r--r-- | lib/rover_commands.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rover_commands.rb b/lib/rover_commands.rb index 080d947..a56bc95 100644 --- a/lib/rover_commands.rb +++ b/lib/rover_commands.rb @@ -1,11 +1,13 @@ class RCommand def run(rover) - rover.rotate(90) + rover.extend(Rotation) + rover.turn_right end end class LCommand def run(rover) - rover.rotate(-90) + rover.extend(Rotation) + rover.turn_left end end class MCommand |
