Last active
August 29, 2015 14:09
-
-
Save jarecoo/60d83dd36f1b235af750 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require 'rrobots' | |
class Robutt | |
include Robot | |
def tick events | |
turn_radar 1 if time == 1 | |
turn_gun 2 if time % 1 | |
if events['robot_scanned'].empty? | |
accelerate 2 | |
else | |
self.stop | |
end | |
accelerate 30 if events['got_hit'] | |
turn 1 | |
fire 1000 | |
# energy 100 | |
say "Eat hot lead" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment