Created
July 3, 2013 03:12
-
-
Save tenderlove/5915157 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
# encoding: utf-8 | |
class BringItOn☑ < RTanque::Bot::Brain | |
NAME = 'BRING IT ON ☑' | |
include RTanque::Bot::BrainHelper | |
def centre | |
RTanque::Point.new(arena.height / 2.0, arena.height / 2.0) | |
end | |
def tick! | |
heading = RTanque::Heading.new_between_points(sensors.position, centre) | |
command.speed = 9001 | |
command.turret_heading = heading | |
command.fire_power = 9001 | |
command.heading = heading | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment