Mercurial > rinkhals
comparison gamelib/gameboard.py @ 345:279974cc0698
Only set color of days left to red when there is only one day left.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 23:08:34 +0000 |
parents | 40667c9caff9 |
children | 6baf8b5beb5c |
comparison
equal
deleted
inserted
replaced
344:1b35fceccaaa | 345:279974cc0698 |
---|---|
824 return True | 824 return True |
825 return False | 825 return False |
826 | 826 |
827 def advance_day(self): | 827 def advance_day(self): |
828 self.days += 1 | 828 self.days += 1 |
829 self.toolbar.day_counter.style.color = (255, 0, 0) | 829 if self.days == constants.TURN_LIMIT: |
830 self.toolbar.day_counter.style.color = (255, 0, 0) | |
830 self.toolbar.update_day_counter("%s/%s" % (self.days, constants.TURN_LIMIT if constants.TURN_LIMIT > 0 else "-")) | 831 self.toolbar.update_day_counter("%s/%s" % (self.days, constants.TURN_LIMIT if constants.TURN_LIMIT > 0 else "-")) |
831 | 832 |
832 def clear_foxes(self): | 833 def clear_foxes(self): |
833 for fox in self.foxes.copy(): | 834 for fox in self.foxes.copy(): |
834 # Any foxes that didn't make it to the woods are automatically | 835 # Any foxes that didn't make it to the woods are automatically |