Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/model.py
diff options
context:
space:
mode:
Diffstat (limited to 'model.py')
-rw-r--r--model.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/model.py b/model.py
index 510c9c4..581be15 100644
--- a/model.py
+++ b/model.py
@@ -3,9 +3,13 @@ import os
import logging
import random
-IMAGES_PATH = os.path.join(os.path.dirname(__file__),'games/drumgit/images')
+IMAGES_PATH = 'games/drumgit/images'
class Model(object):
+ ''' The model of the activity. Contains methods to read and save
+ the configuration for a game from xml. Stores the pairs and grid
+ information.
+ '''
def __init__(self, gamepath, dtdpath, name='noname'):
self.name = name
self.pairs = {}
@@ -95,6 +99,7 @@ class Model(object):
pairkeya, moch = self.grid[a]
pairkeyb, moch = self.grid[b]
return (pairkeya == pairkeyb)
+
if __name__ == '__main__':