Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Created August 13, 2008 03:15
Show Gist options
  • Select an option

  • Save practicingruby/5190 to your computer and use it in GitHub Desktop.

Select an option

Save practicingruby/5190 to your computer and use it in GitHub Desktop.
require "thought"
class Thought
class SafetyFirst
def analyze(map, rover)
return unless map.threat.nonzero?
if 2 * rover.speed > rover.max_sensor or
(rover.rotation_speed and rover.speed > rover.rotation_speed)
Vote.new("b*", 99)
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment