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 | |
def initialize | |
@coordinates = [0, 0] | |
@fired_at = [] | |
end | |
def forward(n) | |
@coordinates[0] += n | |
puts @coordinates |
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 | |
def forward | |
end | |
def backward | |
end | |
def right | |
end |
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 | |
def initialize | |
@coordinates = [0, 0] | |
@fired_at = [] | |
end | |
def forward(n) | |
@coordinates[0] += n | |
end |
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 | |
def initialize | |
@coordinates = [0, 0] | |
@fired_at = [] | |
end | |
def forward(n) | |
@coordinates[0] += n | |
end |
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 | |
def initialize | |
@coordinates = [0, 0] | |
@fired_at = [] | |
end | |
def forward(n) | |
@coordinates[0] += n | |
puts @coordinates, "-----" |
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 | |
def initialize | |
@coordinates = [0, 0] | |
@fired_at = [] | |
end | |
def forward(n) | |
@coordinates[0] += n | |
puts @coordinates, "-----" |
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 | |
end |
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 | |
def forward | |
puts "forward" | |
end | |
def backward | |
puts "backward" | |
end | |
def right |
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 | |
def initialize | |
@coordinates = [0, 0] | |
@fired_at = [] | |
end | |
def forward | |
end | |
def backward |
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
gem install eventmachine |