donjuan.randomizer

Module Contents

Classes

Randomizer

Class for randomizing features of a dungeon.

RandomFilled

Randomly set the filled attribute of cells.

class donjuan.randomizer.Randomizer[source]

Class for randomizing features of a dungeon.

randomize_cell(self, cell: Cell) → None[source]

Randomize properties of the Cell

randomize_dungeon(self, dungeon: Dungeon) → None[source]

Randomize properties of the Dungeon

randomize_grid(self, grid: Grid) → None[source]

Randomize properties of the Grid

randomize_hallway(self, hallway: Hallway) → None[source]

Randomize properties of the Hallway

randomize_room_entrances(self, room: Room, *args) → None[source]

Randomize the entrances of the Room

randomize_room_size(self, room: Room, *args) → None[source]

Randomize the size of the Room

randomize_room_name(self, room: Room, *args) → None[source]

Randomize the name of a Room

randomize_room_position(self, room: Room, *args) → None[source]

Randomize the position of a Room

classmethod seed(cls, seed: Optional[int] = None) → None[source]
Parameters

seed (Optional[int]) – seed passed to random.seed()

class donjuan.randomizer.RandomFilled[source]

Bases: donjuan.randomizer.Randomizer

Randomly set the filled attribute of cells.

randomize_cell(self, cell: Cell) → None[source]

Randomly fill the cell with probability 50%

randomize_grid(self, grid: Grid) → None[source]

Randomly fill all cells of the grid individually