Mercurial > rinkhals
diff gamelib/gameboard.py @ 457:fc648da2334c
Fix position cache removal, slightly optimise chicken range check.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Mon, 23 Nov 2009 16:12:37 +0000 |
parents | 96dbf2c8506e |
children | 7204c16ab64d |
line wrap: on
line diff
--- a/gamelib/gameboard.py Mon Nov 23 10:30:22 2009 +0000 +++ b/gamelib/gameboard.py Mon Nov 23 16:12:37 2009 +0000 @@ -57,7 +57,7 @@ self._cache[animal_type][animal.pos] = animal def remove(self, pos, animal_type): - if pos in self._cache: + if pos in self._cache[animal_type]: del self._cache[animal_type][pos] def update(self, old_pos, animal, animal_type):