Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a simple uninitialized ivar warning.

  • Loading branch information...
commit 2f3c5f4d5b853d68d68aa916899bf7049671f0c6 1 parent 80df036
@zenspider zenspider authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 sample_bots/seek_and_destroy.rb
View
4 sample_bots/seek_and_destroy.rb
@@ -8,6 +8,8 @@ class SeekAndDestroy < RTanque::Bot::Brain
TURRET_FIRE_RANGE = RTanque::Heading::ONE_DEGREE * 5.0
def tick!
+ @desired_heading ||= nil
+
if (lock = self.get_radar_lock)
self.destroy_lock(lock)
@desired_heading = nil
@@ -48,4 +50,4 @@ def get_radar_lock
@locked_on = lock.name if lock
lock
end
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.