Changeset 236:9a6ac9c9ff46


Ignore:
Timestamp:
Sep 5, 2009, 9:46:29 AM (11 years ago)
Author:
Adrianna Pińska <adrianna.pinska@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@237
Message:

chickens turn to face target foxes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gamelib/animal.py

    r216 r236  
    5151        self.pos = new_pos
    5252
    53     def _fix_face(self, final_pos):
     53    def _fix_face(self, facing_pos):
    5454        """Set the face correctly"""
    55         if final_pos.left_of(self.pos):
     55        if facing_pos.left_of(self.pos):
    5656            self._set_image_facing('left')
    57         elif final_pos.right_of(self.pos):
     57        elif facing_pos.right_of(self.pos):
    5858            self._set_image_facing('right')
    5959
     
    182182        if not fox:
    183183            return
     184        self._fix_face(fox.pos)
    184185        if weapon.hit(gameboard, self, fox):
    185186            sound.play_sound("kill-fox.ogg")
Note: See TracChangeset for help on using the changeset viewer.