Ejemplo n.º 1
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(FillTagBuilder, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'attributeName')
     self.tag_value = common.getString(configuration, 'attributeValue')
     self.world_width = common.getInt(configuration, 'worldWidth', 0)
     self.world_height = common.getInt(configuration, 'worldHeight', 0)
Ejemplo n.º 2
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(FillTagBuilder, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'attributeName')
     self.tag_value = common.getString(configuration, 'attributeValue')
     self.world_width = common.getInt(configuration, 'worldWidth', 0)
     self.world_height = common.getInt(configuration, 'worldHeight', 0)
Ejemplo n.º 3
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(CaveBuilder, self).__init__(configuration)
     #
     self.initial_open = common.getFloat(configuration, 'initialOpenFraction')
     self.tag_name = common.getString(configuration, 'attributeName')
     self.rock = common.getString(configuration, 'rockValue')
     self.tunnel = common.getString(configuration, 'tunnelValue')
Ejemplo n.º 4
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(MazeBuilder, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'attributeName')
     self.wall = common.getString(configuration, 'wallValue')
     self.floor = common.getString(configuration, 'floorValue')
     self.door = common.getString(configuration, 'doorValue')
     self.entrances = common.getInt(configuration, 'numberEntrances')
Ejemplo n.º 5
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(CaveBuilder, self).__init__(configuration)
     #
     self.initial_open = common.getFloat(configuration,
                                         'initialOpenFraction')
     self.tag_name = common.getString(configuration, 'attributeName')
     self.rock = common.getString(configuration, 'rockValue')
     self.tunnel = common.getString(configuration, 'tunnelValue')
Ejemplo n.º 6
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(MazeBuilder, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'attributeName')
     self.wall = common.getString(configuration, 'wallValue')
     self.floor = common.getString(configuration, 'floorValue')
     self.door = common.getString(configuration, 'doorValue')
     self.entrances = common.getInt(configuration, 'numberEntrances')
Ejemplo n.º 7
0
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(StringRenderer, self).__init__(configuration)
     #
     self.default_value = common.getString(configuration, 'defaultValue')
     self.values = {}
     for value in configuration.find('attributeValues').findall('attributeValue'):
         self.values[common.getStrAttr(value, 'tag')] = common.getTupleAttr(value, 'colour')
Ejemplo n.º 8
0
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(StringRenderer, self).__init__(configuration)
     #
     self.default_value = common.getString(configuration, 'defaultValue')
     self.values = {}
     for index, value in enumerate(configuration.find('attributeValues').findall('attributeValue')):
         self.values[common.getStrAttr(value, 'tag')] = ColourEntry(
             common.getTupleAttr(value, 'colour'),
             common.getIntAttr(value, 'index', index + 1)
         )
 def __init__(self, configuration):
     """Initialise the builder"""
     super(BomberProcedural, self).__init__(configuration)
     #
     # Get properties
     self.symmetry = common.getString(configuration, "symmetry").lower().strip()
     self.width = common.getInt(configuration, "width")
     self.height = common.getInt(configuration, "height")
     self.blocks_between = common.getInt(configuration, "blocksBetweenEnemies")
     self.destructible_blocks = common.getInt(configuration, "destructibleBlocks")
     self.keep_clear_distance = common.getInt(configuration, "keepClearDistance")
     self.maze_like = common.getTrue(configuration, "makeLike")
Ejemplo n.º 10
0
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(TiledRenderer, self).__init__(configuration)
     #
     self.tileset_filename = common.getString(configuration, 'tilesetFilename')
Ejemplo n.º 11
0
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(TagNameRenderer, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'tagName')
Ejemplo n.º 12
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(IslandFinder, self).__init__(configuration)
     #
     self.sea_tags = common.getString(configuration, 'seaTags')
     self.smallest_island = common.getInt(configuration, 'smallestIsland')
Ejemplo n.º 13
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(WorldClipper, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'tagName')
     self.tag_value = common.getString(configuration, 'tagValue')
Ejemplo n.º 14
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(StringBuilder, self).__init__(configuration)
     #
     self.tag_value = common.getString(configuration, 'attributeValue')
Ejemplo n.º 15
0
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(TiledRenderer, self).__init__(configuration)
     #
     self.tileset_filename = common.getString(configuration, 'tilesetFilename')
     self.layer_name = common.getString(configuration, 'layerName', 'Render')
Ejemplo n.º 16
0
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(TagNameRenderer, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'tagName')
Ejemplo n.º 17
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(StringBuilder, self).__init__(configuration)
     #
     self.tag_value = common.getString(configuration, 'attributeValue')
Ejemplo n.º 18
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(IslandFinder, self).__init__(configuration)
     #
     self.sea_tags = common.getString(configuration, 'seaTags')
     self.smallest_island = common.getInt(configuration, 'smallestIsland')
Ejemplo n.º 19
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(WorldClipper, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'tagName')
     self.tag_value = common.getString(configuration, 'tagValue')