Better name for SaveGame.
authorSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 10:50:27 +0000 (12:50 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 10:50:27 +0000 (12:50 +0200)
naja/scenes/load_save.py

index c021ea7515ed9a93b22c82ca6922de6788c383f0..50c1446933abac568382dc0b1f08471a54aa5172 100644 (file)
@@ -28,7 +28,7 @@ def ensure_save_path_exists():
         os.makedirs(location)
 
 
-class SaveGame(object):
+class SaveGameSlot(object):
     def __init__(self, slot_num):
         self.slot_num = slot_num
 
@@ -74,7 +74,7 @@ class LoadSaveGameBase(Scene):
             selector.add(slot)
 
     def make_slot_widget(self, slot_num):
-        game_data = SaveGame(slot_num).get_game_data()
+        game_data = SaveGameSlot(slot_num).get_game_data()
         y_offset = 74 * slot_num
         slot = SaveSlotWidget((100, y_offset), slot_num, game_data)
         slot.add_callback('click', lambda event: self.perform_action(slot_num))
@@ -100,7 +100,7 @@ class LoadSaveGameBase(Scene):
 class SaveGameScene(LoadSaveGameBase):
     def perform_action(self, slot_num):
         try:
-            SaveGame(slot_num).save(self.state)
+            SaveGameSlot(slot_num).save(self.state)
         except Exception as e:
             print "Error saving game in slot %s: %s" % (slot_num, e)
             self.fail()
@@ -115,7 +115,7 @@ class SaveGameScene(LoadSaveGameBase):
 
 class LoadGameScene(LoadSaveGameBase):
     def perform_action(self, slot_num):
-        state = SaveGame(slot_num).load()
+        state = SaveGameSlot(slot_num).load()
         if state is not None:
             LoadGameEvent.post(state)
             self.succeed()