Created
May 5, 2016 17:47
-
-
Save dsomel21/5150c1cb5cca7a817bc0b4eb78371327 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not actually10, i just wanted to see the test spit out the results and expectations side by side