Mercurial > rinkhals
changeset 104:d17375586866
Add .covers(tile_pos) to animals (to match similar function on buildings).
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Wed, 02 Sep 2009 18:09:57 +0000 |
parents | c74849c923db |
children | 7910b4e01dba |
files | gamelib/animal.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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"""