Created
August 13, 2008 03:15
-
-
Save practicingruby/5190 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 "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