pyherc.generators.level.partitioners.grid

Module for partitioning level to equal grid

RandomConnector

class pyherc.generators.level.partitioners.grid.RandomConnector(random_generator=<random.Random object at 0x01DC3378>)

Class for building random connection network from sections

connect_sections(sections, start_section=None)

Connects sections together @param sections: List of Sections to connect @param start_section: optional parameter specifying starting section

form_path_from_sections(start_section, sections)

Builds path of connected sections @param start_section: Section to start connecting from @param sections: List of sections to connect

GridPartitioner

class pyherc.generators.level.partitioners.grid.GridPartitioner(random_generator=<random.Random object at 0x01D7AFC8>)

Class for partitioning level to equal grid

connect_new_section(section, location, sections)

Connects section in given location to its neighbours

partition_level(level, x_sections=3, y_sections=3)

Creates partitioning for a given level with connection points @param level: Level to partition @returns: List of connected sections

split_range_to_equals(length, sections)

Split range into equal sized chunks @param length: range to split @param sections: amount of sections to split @returns: list containing end points of chunks

Table Of Contents

Previous topic

pyherc.generators.level.partitioners

Next topic

pyherc.generators.level.partitioners.section

This Page