コード例 #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)
コード例 #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)
コード例 #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')
コード例 #4
0
ファイル: maze.py プロジェクト: hemebond/procgen
 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')
コード例 #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')
コード例 #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')
コード例 #7
0
ファイル: main.py プロジェクト: hemebond/procgen
 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')
コード例 #8
0
ファイル: main.py プロジェクト: ihungalexhsu/RL-bombr_man
 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)
         )
コード例 #9
0
 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")
コード例 #10
0
ファイル: main.py プロジェクト: hemebond/procgen
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(TiledRenderer, self).__init__(configuration)
     #
     self.tileset_filename = common.getString(configuration, 'tilesetFilename')
コード例 #11
0
ファイル: main.py プロジェクト: hemebond/procgen
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(TagNameRenderer, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'tagName')
コード例 #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')
コード例 #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')
コード例 #14
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(StringBuilder, self).__init__(configuration)
     #
     self.tag_value = common.getString(configuration, 'attributeValue')
コード例 #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')
コード例 #16
0
 def __init__(self, configuration):
     """Initialise the renderer"""
     super(TagNameRenderer, self).__init__(configuration)
     #
     self.tag_name = common.getString(configuration, 'tagName')
コード例 #17
0
 def __init__(self, configuration):
     """Initialise the builder"""
     super(StringBuilder, self).__init__(configuration)
     #
     self.tag_value = common.getString(configuration, 'attributeValue')
コード例 #18
0
ファイル: islands.py プロジェクト: ihungalexhsu/RL-bombr_man
 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')
コード例 #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')