changeset 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 1b35fceccaaa
children 6baf8b5beb5c
files gamelib/gameboard.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/gameboard.py	Sat Sep 05 23:04:40 2009 +0000
+++ b/gamelib/gameboard.py	Sat Sep 05 23:08:34 2009 +0000
@@ -826,7 +826,8 @@
 
     def advance_day(self):
         self.days += 1
-        self.toolbar.day_counter.style.color = (255, 0, 0)
+        if self.days == constants.TURN_LIMIT:
+            self.toolbar.day_counter.style.color = (255, 0, 0)
         self.toolbar.update_day_counter("%s/%s" % (self.days, constants.TURN_LIMIT if constants.TURN_LIMIT > 0 else "-"))
 
     def clear_foxes(self):