From b148f9923dd40e35c972c93ef1ac03e431a4b65c Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Wed, 04 Jul 2007 20:24:56 +0000 Subject: - Moved things in a cleaner MVC. - switched in the collaboration code to elect a leader and do total ordering - Added the NEWS file --- (limited to 'model.py') 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__': -- cgit v0.9.1