levelz.parser

Attributes

HEADER_END

The end of the Header section.

END

The end of a Level.

Functions

parse_level(level)

Parses a Level from a string. Uses 'n' as the line separator.

parse_file(file)

Parses a Level from a file.

parse_lines(level)

Parses a Level from a list of strings.

__split(level)

__objectify(input)

__roll(blocks, chances)

__readHeaders(headers)

__read2DPoints(input)

__read3DPoints(input)

__readLine(input[, threeD])

__readBlock(line)

__readRawBlock(input)

Module Contents

levelz.parser.HEADER_END = '---'

The end of the Header section.

levelz.parser.END = 'end'

The end of a Level.

levelz.parser.parse_level(level: str)

Parses a Level from a string. Uses ‘n’ as the line separator.

levelz.parser.parse_file(file: str)

Parses a Level from a file.

levelz.parser.parse_lines(level: list[str])

Parses a Level from a list of strings.

levelz.parser.__split(level: list[str])
levelz.parser.__objectify(input: str)
levelz.parser.__roll(blocks: list[levelz.block.Block], chances: list[float])
levelz.parser.__readHeaders(headers: list[str])
levelz.parser.__read2DPoints(input: str)
levelz.parser.__read3DPoints(input: str)
levelz.parser.__readLine(input: str, threeD: bool = False)
levelz.parser.__readBlock(line: str)
levelz.parser.__readRawBlock(input: str)