Mercurial > rinkhals
diff gamelib/gameboard.py @ 264:812bd4cda8b8
evict button
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 13:56:43 +0000 |
parents | d508248041ff |
children | 31f5033eac70 |
line wrap: on
line diff
--- a/gamelib/gameboard.py Sat Sep 05 13:51:49 2009 +0000 +++ b/gamelib/gameboard.py Sat Sep 05 13:56:43 2009 +0000 @@ -562,7 +562,15 @@ building.selected(False) def evict_callback(): - print 'evict called', self.animal_to_place + if not self.animal_to_place: + return + for tile_pos in building.adjacent_tiles(): + if self.tv.get(tile_pos) != self.GRASSLAND: + continue + if self.get_outside_chicken(tile_pos) is None: + update_button(self.animal_to_place, empty=True) + self.place_animal(tile_pos) + break if not sell_callback: tbl.tr()