Skip to content

Instantly share code, notes, and snippets.

@dsomel21
Created May 5, 2016 17:47
Show Gist options
  • Save dsomel21/5150c1cb5cca7a817bc0b4eb78371327 to your computer and use it in GitHub Desktop.
Save dsomel21/5150c1cb5cca7a817bc0b4eb78371327 to your computer and use it in GitHub Desktop.
class Robot
attr_accessor :x, :y, :position
def initialize
@x = 0
@y = 0
@position = []
end
def position
position = []
position.push(@x)
position.push(@y)
end
def move_left
@x -= 10
end
def move_right
@x += 10
end
def move_up
@y += 10
end
def move_down
@y -= 10
end
end
@dsomel21
Copy link
Author

dsomel21 commented May 5, 2016

Not actually10, i just wanted to see the test spit out the results and expectations side by side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment