Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Created July 3, 2013 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tenderlove/5915157 to your computer and use it in GitHub Desktop.
Save tenderlove/5915157 to your computer and use it in GitHub Desktop.
# 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