diff gamelib/animal.py @ 269:445f746449fa

Tweak sapper fox path weighting
author Neil Muller <drnlmuller@gmail.com>
date Sat, 05 Sep 2009 14:06:53 +0000
parents fcaae2cfe3cd
children 664bba9be40a
line wrap: on
line diff
--- a/gamelib/animal.py	Sat Sep 05 14:02:25 2009 +0000
+++ b/gamelib/animal.py	Sat Sep 05 14:06:53 2009 +0000
@@ -465,6 +465,10 @@
     DIG_ANIMATION = animations.FenceExplosion
     IMAGE_FILE = 'sprites/sapper_fox.png'
 
+    def __init__(self, pos):
+        Fox.__init__(self, pos)
+        self.costs['fence'] = 2 # We don't worry about fences
+
     def _dig(self, gameboard, dig_pos):
         """Setup dig parameters, to be overridden if needed"""
         self.tick = 0 # Costs us nothing to go through a fence.