Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/model.py
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2007-07-04 20:24:56 (GMT)
committer Simon Schampijer <simon@schampijer.de>2007-07-04 20:24:56 (GMT)
commitb148f9923dd40e35c972c93ef1ac03e431a4b65c (patch)
tree9085ef41472a16601b77206594c82256ba1b4cfd /model.py
parente749983674604effe0a304dc4c91a7719a11074c (diff)
- Moved things in a cleaner MVC.
- switched in the collaboration code to elect a leader and do total ordering - Added the NEWS file
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__':