# HG changeset patch # User Simon Cross # Date 1251914997 0 # Node ID d1737558686614e3a2b6722c575dc45b04ecd796 # Parent c74849c923db46feef7896ec0baeac91ce900b69 Add .covers(tile_pos) to animals (to match similar function on buildings). diff -r c74849c923db -r d17375586866 gamelib/animal.py --- a/gamelib/animal.py Wed Sep 02 18:05:04 2009 +0000 +++ b/gamelib/animal.py Wed Sep 02 18:09:57 2009 +0000 @@ -44,6 +44,9 @@ def weapons(self): return [e for e in self.equipment if e.is_weapon] + def covers(self, tile_pos): + return tile_pos[0] == self.pos.x and tile_pos[1] == self.pos.y + class Chicken(Animal): """A chicken"""