Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/game.py
diff options
context:
space:
mode:
Diffstat (limited to 'game.py')
-rw-r--r--game.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/game.py b/game.py
index ca83ea2..f47c6e3 100644
--- a/game.py
+++ b/game.py
@@ -40,7 +40,8 @@ log.setLevel(logging.DEBUG)
import olpcgames.pausescreen as pausescreen
import olpcgames.mesh as mesh
-from olpcgames.util import get_bundle_path
+from sugar.activity import activity
+activity.get_bundle_path
from sugar.presence import presenceservice
bundlepath = get_bundle_path()
@@ -309,14 +310,14 @@ class MazeGame:
elif hasattr(event, 'action') and event.action == 'easier_button':
self.easier()
# process file save / restore events
- elif event.code == olpcgames.FILE_READ_REQUEST:
+ elif event.code == activity.FILE_READ_REQUEST:
log.debug('Loading the state of the game...')
state = json.loads(event.metadata['state'])
log.debug('Loaded data: %s', state)
self.maze = Maze(**state)
self.reset()
return True
- elif event.code == olpcgames.FILE_WRITE_REQUEST:
+ elif event.code == activity.FILE_WRITE_REQUEST:
log.debug('Saving the state of the game...')
data = {'seed': self.maze.seed,
'width': self.maze.width,