Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKshitij Kumar <kshitijakumar@gmail.com>2013-01-07 17:20:06 (GMT)
committer Kshitij Kumar <kshitijakumar@gmail.com>2013-01-07 17:20:06 (GMT)
commite50528bfe7fe77f8ccbe5811fbd7026a0ff6af99 (patch)
tree69ef6fb9c1a178cb7b86e2ae2fa7beb57c2e7020
parent20642207eee5b9509cf9a78ff99097a1948e2cdd (diff)
olpcgames to sugargame fixes
-rwxr-xr-xactivity.py2
-rw-r--r--game.py7
-rw-r--r--player.py4
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
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,
diff --git a/player.py b/player.py
index f9a3452..1677d84 100644
--- a/player.py
+++ b/player.py
@@ -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: