Validate levels during gameplay
authorNeil <neil@dip.sun.ac.za>
Thu, 18 Apr 2013 12:05:19 +0000 (14:05 +0200)
committerNeil <neil@dip.sun.ac.za>
Thu, 18 Apr 2013 12:05:19 +0000 (14:05 +0200)
erdslangetjie/__main__.py

index 71ef53b405cc46e9c6f5a8780109e6eaeac8abda..5cd9b7fcc39de69995406e7b4f8615fe7ab6edde 100644 (file)
@@ -25,6 +25,7 @@ class GameWindow(RelativeLayout):
     def __init__(self, level_list, app):
         self.level_list = level_list
         self.level_obj = self.level_list.get_current_level()
+        self.level_obj.validate()
         self.level_obj.load_tiles()
         self.tiles = {}
         self.view = app.root
@@ -206,6 +207,7 @@ class GameWindow(RelativeLayout):
         self.remove_widget(self.nemesis_tile)
         self.nemesis.reset_pos()
         if self.level_obj:
+            self.level_obj.validate()
             self.level_obj.load_tiles()
             self.player.pos = self.level_obj.enter_pos
             self.remove_widget(self.player_tile)