Class: Command::Move

Inherits:
Object
  • Object
show all
Defined in:
lib/karel/command/move.rb

Instance Method Summary collapse

Instance Method Details

#execute(compass, location, tokens) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/karel/command/move.rb', line 5

def execute(compass, location, tokens)
  new_location =
  Response.new(
    compass: compass,
    location: compass.translate_location(location),
    tokens: tokens
  )
end