diff options
author | Dpk3062 <dpk3062@rit.edu> | 2009-07-06 03:48:30 (GMT) |
---|---|---|
committer | Dpk3062 <dpk3062@rit.edu> | 2009-07-06 03:48:30 (GMT) |
commit | 3d58f3f0ffc9041ad6f87364e0b209c0b0a8cdb3 (patch) | |
tree | 17c374c77f627dde11ec1636c438758e253a1e79 /src/setup/level.py | |
parent | be5f99eca2a2d42552605a1e9fb34063734903ba (diff) |
* Now using Curses for text display
* 'Main Menu' working
* 'Change Player' menu working
* Putting constants and strings in utils.strs.py
* Added class 'Profile'
* Renamed class 'LevelInfo' to 'Level'
Note: paths still hard coded for main developer's machine
Diffstat (limited to 'src/setup/level.py')
-rw-r--r-- | src/setup/level.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/setup/level.py b/src/setup/level.py index 907d8bd..193e8f7 100644 --- a/src/setup/level.py +++ b/src/setup/level.py @@ -1,10 +1,12 @@ ''' ''' -from lxml import etree -from utils import utils +from lxml import etree # using lxml for XML processing +from utils import strs # string constants +from utils import utils # some XML utilities -class LevelInfo(object): + +class Level(object): ''' ''' @@ -15,16 +17,17 @@ class LevelInfo(object): #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] + self.name = root.xpath(strs.XP_LevelName)[0] + self.description = root.xpath(strs.XP_LevelName)[0] + self.path = path pass def getName(self): - '''Gets the name of this level''' + '''Returns the name of this level''' return self.name def getDescription(self): - '''Gets the description of this level''' + '''Returns the description of this level''' return self.description |