Add days to gamestate and day screen display
authorNeil <neil@dip.sun.ac.za>
Sat, 10 Sep 2016 12:24:09 +0000 (14:24 +0200)
committerNeil <neil@dip.sun.ac.za>
Sat, 10 Sep 2016 12:28:39 +0000 (14:28 +0200)
tabakrolletjie/gamestate.py
tabakrolletjie/scenes/day.py

index 714a0475b7b5507a170f8176276827feaa08bad7..4ce92e832007db534b6af5422b7be2cc4d799d9d 100644 (file)
@@ -9,6 +9,7 @@ class GameState(object):
         }
         self.harvested = 0
         self.eaten = 0
+        self.days = 0
 
     @property
     def station(self):
index ec94bc63302137ebb6077082ebcaf6f17dbfcb06..e54e2f1664a6c5ecc916127e1b5bf0b37d2f5e9e 100644 (file)
@@ -244,8 +244,8 @@ class DayScene(BaseScene):
             self._lights.tick()
 
     def _update_toolbar(self, gamestate):
-        text = ("Turnip Stocks: Seeds: %d. Planted: %d. "
+        text = ("Day: %d: Turnip Stocks: Seeds: %d. Planted: %d. "
                 "Harvested: %d. Destroyed: %d" %
-                (self._seeds, len(self._turnips),
+                (gamestate.days, self._seeds, len(self._turnips),
                  self._harvested, gamestate.eaten))
         self._toolbar = self._toolbar_font.render(text, True, (255, 255, 255))