diff options
author | Simon Schampijer <simon@schampijer.de> | 2007-07-04 20:24:56 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2007-07-04 20:24:56 (GMT) |
commit | b148f9923dd40e35c972c93ef1ac03e431a4b65c (patch) | |
tree | 9085ef41472a16601b77206594c82256ba1b4cfd /model.py | |
parent | e749983674604effe0a304dc4c91a7719a11074c (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.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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__': |