Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoug <doug@printer-g589.(none)>2009-09-02 20:52:22 (GMT)
committer doug <doug@printer-g589.(none)>2009-09-02 20:52:22 (GMT)
commitfc9137d622a2718db137d147e5d3d36b5c573a7a (patch)
treefbd9bce8e9f17d3fa65f29ff66297207c10bf379
parenta836b1710a95561b94fb35f21ee42eb5a8ef828b (diff)
parent0b510198ed9b010363d1f8ef82ce1f30df780109 (diff)
removed more conflicted files
-rw-r--r--docs/web/SugarLab ProjectWiki Page.txt59
-rw-r--r--src/setup/__init__.py0
-rw-r--r--src/setup/level.py31
-rw-r--r--src/setup/main.py61
4 files changed, 92 insertions, 59 deletions
diff --git a/docs/web/SugarLab ProjectWiki Page.txt b/docs/web/SugarLab ProjectWiki Page.txt
deleted file mode 100644
index c0aa89f..0000000
--- a/docs/web/SugarLab ProjectWiki Page.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-=Muthris=
-Muthris is a math themed, Tetris-based game inspired by Cuyo and is not yet ready for public release. Players control falling blocks which must be grouped in certain ways in-order to clear that grouping from the board. The main game engine is abstracted away from the levels for the easy creation and addition of new levels. For more details, see the project's Vision and Scope document contained in its Sugar Labs' Gitorious repository.
-==Project Updates as of Sepetember 2nd, 2009==
-* Updated Wiki page
-* Menu system is working, but a few parts are still stubbed out
-* Have overall project documentation
-* Have more detailed documentation of certain areas
-* Have a project skeleton coded
-* Still having Git repository issues
-==Developers==
-===Active===
-===Inactive===
-* [[User:Dpk3062|Douglas Krofcheck]]
-==Goals==
-* To be fun to play
-* To teach mathematical concepts
-* To be discrete in its teachings
-* To follow good software engineering practices during development
-==Schedule and Tasks==
-* There is no schedule at this time as all active developers have transitioned to inactive developers due to school related time constraints
-==Overall Plan==
-The overall plan is basically the project requirements grouped by importance. See the ''Vision and Scope'' document and the ''Haves and Have Nots'' section of this page for further details.
-==Haves and Have Nots==
-===Must Have===
-* Project Documentation
-** Vision and Scope ''(have)''
-** Architecture docs ''(have some)''
-** Flow Charts ''(have)''
-* Working code repository ''(have some of the time...)''
-* Project schedule ''(missing)''
-* At least one active developer ''(missing)''
-* Text-based version of the game ''(being developed)''
-* Readme with running instructions ''(have)''
-===Should Have===
-* Skeleton - a working, stubbed framework before general coding ''(have)''
-* Installation tutorial ''(partly)''
-* Program walk-through ''(missing)''
-* GUI version of the game ''(missing)''
-* Build tutorial ''(missing)''
-* Project backup ''(have)''
-* Example lession plan ''(have)''
-===Nice to Have===
-* Unit tests ''(missing)''
-* SRS Document ''(missing)''
-* Release 1 ''(missing)''
-* No major project risks ''(missing)''
-==Major Project Risks==
-* Git pushing issues
-* Limited time available for development
-* Developers are inexperienced with Python and PyGame
-==Other Info==
-===Project Contacts===
-*[[User:Dpk3062|Douglas Krofcheck]]
-===Links and Resources===
-*[http://git.sugarlabs.org/projects/muthris Project Repository]
-*[http://www.openoffice.org/ OpenOffice.org] - to read documentation files (.odt)
-*[http://live.gnome.org/Dia Dia] - To view flow charts (.dia)
-===Initial Math4OLPC Educational Target===
-* 4.N.7 - Recognize classes (in particular, odds, evens; factors or multiples of a given number; and squares) to which a number may belong, and identify the numbers in those classes. Use these in the solution of problems
diff --git a/src/setup/__init__.py b/src/setup/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/setup/__init__.py
diff --git a/src/setup/level.py b/src/setup/level.py
new file mode 100644
index 0000000..907d8bd
--- /dev/null
+++ b/src/setup/level.py
@@ -0,0 +1,31 @@
+'''
+
+'''
+from lxml import etree
+from utils import utils
+
+class LevelInfo(object):
+ '''
+ '''
+
+ def __init__(self, path):
+ '''
+ Constructor
+ '''
+
+ #open up the mlvl file and read in its basic properties
+ root = utils.getXMLRoot(path)
+ self.name = root.xpath('//level-info/@name')[0]
+ self.description = root.xpath('//level-info/@description')[0]
+ pass
+
+ def getName(self):
+ '''Gets the name of this level'''
+ return self.name
+
+ def getDescription(self):
+ '''Gets the description of this level'''
+ return self.description
+
+
+ \ No newline at end of file
diff --git a/src/setup/main.py b/src/setup/main.py
new file mode 100644
index 0000000..1f05f10
--- /dev/null
+++ b/src/setup/main.py
@@ -0,0 +1,61 @@
+'''
+
+'''
+
+if __name__ == '__main__':
+ pass
+
+import os
+
+# using lxml for XML processing
+from lxml import etree
+from level import LevelInfo
+from utils import utils
+
+# constants
+ConfigFile = '/home/doug/workspace/Muthris/docs/examples/config.xml'
+LevelExt = '.mlvl'
+
+# load the configuration file
+config = utils.getXMLRoot(ConfigFile)
+
+#for each level folder, scan for and process any Muthris level files (.mlvl)
+levels = []
+folders = config.xpath('//level-folders/folder/@location')
+for folder in folders:
+ #search for files in the level folder
+ list = os.listdir(folder)
+ print(list)
+ for path in list:
+ #make sure path is not just the filename, as isfile() would fail if it was
+ path = folder + '/' + path
+
+ #only want level files
+ if not os.path.isfile(path):
+ continue
+ if not path.endswith(LevelExt):
+ continue
+
+ #create a level object for this level file
+ level = LevelInfo( path )
+ levels.append( level )
+
+print( config )
+print( folders )
+
+
+
+# find all the level folders
+
+# load all the level folders
+
+# start the menus
+
+print( 'done' )
+
+
+def processLevelFile( file ):
+ ''' '''
+ pass
+
+