changeset 68:6b8ac424da83

Add button for finishing day. Remove debugging print.
author Simon Cross <hodgestar@gmail.com>
date Mon, 31 Aug 2009 21:41:34 +0000
parents 9171d9b9ab35
children 18db99fda6bd
files gamelib/gameboard.py
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/gameboard.py	Mon Aug 31 21:22:10 2009 +0000
+++ b/gamelib/gameboard.py	Mon Aug 31 21:41:34 2009 +0000
@@ -33,6 +33,15 @@
         for building_cls in buildings.BUILDINGS:
             self.add_tool_button("Buy %s" % (building_cls.NAME,), building_cls)
 
+        day_done_button = gui.Button("Finished Day")
+        day_done_button.connect(gui.CLICK, self.day_done)
+        self.tr()
+        self.td(day_done_button, style={"padding_top": 30})
+
+    def day_done(self):
+        import engine
+        pygame.event.post(engine.START_NIGHT)
+
     def update_cash_counter(self, amount):
         self.cash_counter.update_value("Groats: %s" % amount)
         self.repaint()
@@ -246,7 +255,6 @@
            Could be a lot faster.
            """
         tile_to_building = dict((b.TILE_NO, b) for b in buildings.BUILDINGS)
-        print tile_to_building
 
         w, h = self.tv.size
         for x in xrange(w):