diff options
author | Kshitij Kumar <kshitijakumar@gmail.com> | 2013-01-07 17:20:06 (GMT) |
---|---|---|
committer | Kshitij Kumar <kshitijakumar@gmail.com> | 2013-01-07 17:20:06 (GMT) |
commit | e50528bfe7fe77f8ccbe5811fbd7026a0ff6af99 (patch) | |
tree | 69ef6fb9c1a178cb7b86e2ae2fa7beb57c2e7020 | |
parent | 20642207eee5b9509cf9a78ff99097a1948e2cdd (diff) |
olpcgames to sugargame fixes
-rwxr-xr-x | activity.py | 2 | ||||
-rw-r--r-- | game.py | 7 | ||||
-rw-r--r-- | player.py | 4 |
3 files changed, 6 insertions, 7 deletions
diff --git a/activity.py b/activity.py index 90b1113..9b82373 100755 --- a/activity.py +++ b/activity.py @@ -7,8 +7,6 @@ import pygame import gtk import game -from olpcgames import mesh -from olpcgames import util from sugar.activity.widgets import ActivityToolbarButton from sugar.activity.widgets import StopButton @@ -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, @@ -25,8 +25,8 @@ import pygame import unicodedata -from olpcgames.util import get_bundle_path -bundlepath = get_bundle_path() +from sugar.activity import activity +activity.get_bundle_path class Player: |