public class PacMazeGenerator extends java.lang.Object implements IDungeonGenerator
Modifier and Type | Field and Description |
---|---|
int |
height |
int |
passageBreadth |
IRNG |
rng |
int |
wallBreadth |
int |
width |
Constructor and Description |
---|
PacMazeGenerator() |
PacMazeGenerator(int width,
int height) |
PacMazeGenerator(int width,
int height,
int wallBreadth,
int passageBreadth,
IRNG rng) |
PacMazeGenerator(int width,
int height,
IRNG rng) |
Modifier and Type | Method and Description |
---|---|
GreasedRegion |
create() |
char[][] |
generate()
Generates a dungeon or other map as a 2D char array.
|
char[][] |
getDungeon()
Gets the maze as a 2D array of ',' for passable or '#' for blocked.
|
int[][] |
getEnvironment() |
GreasedRegion |
getMap()
Gets the maze as a 2D array of true for passable or false for blocked.
|
char[][] |
getMaze()
Gets the maze as a 2D array of ',' for passable or '#' for blocked.
|
public IRNG rng
public int width
public int height
public int wallBreadth
public int passageBreadth
public PacMazeGenerator()
public PacMazeGenerator(int width, int height)
public PacMazeGenerator(int width, int height, IRNG rng)
public PacMazeGenerator(int width, int height, int wallBreadth, int passageBreadth, IRNG rng)
width
- the x-size of the maze map to produceheight
- the y-size of the maze map to producewallBreadth
- how thick wall sections should be; defaults to 2passageBreadth
- how broad passages should be; defaults to 1rng
- an IRNG, such as a RNG
, which can be seededpublic GreasedRegion create()
public char[][] generate()
IDungeonGenerator
generate
in interface IDungeonGenerator
public int[][] getEnvironment()
public GreasedRegion getMap()
public char[][] getMaze()
public char[][] getDungeon()
getDungeon
in interface IDungeonGenerator
Copyright © Eben Howard 2012–2022. All rights reserved.