public class ClassicRogueMapGenerator extends java.lang.Object implements IDungeonGenerator
| Constructor and Description |
|---|
ClassicRogueMapGenerator(int horizontalRooms,
int verticalRooms,
int dungeonWidth,
int dungeonHeight,
int minRoomWidth,
int maxRoomWidth,
int minRoomHeight,
int maxRoomHeight)
Initializes the generator to turn out random dungeons within the specific
parameters.
|
ClassicRogueMapGenerator(int horizontalRooms,
int verticalRooms,
int dungeonWidth,
int dungeonHeight,
int minRoomWidth,
int maxRoomWidth,
int minRoomHeight,
int maxRoomHeight,
IRNG rng)
Initializes the generator to turn out random dungeons within the specific
parameters.
|
| Modifier and Type | Method and Description |
|---|---|
char[][] |
generate()
Builds and returns a map in the Classic Rogue style, returned as a 2D char array.
|
char[][] |
getDungeon()
Gets the most recently-produced dungeon as a 2D char array, usually produced by calling
IDungeonGenerator.generate() or
some similar method present in a specific implementation. |
public ClassicRogueMapGenerator(int horizontalRooms,
int verticalRooms,
int dungeonWidth,
int dungeonHeight,
int minRoomWidth,
int maxRoomWidth,
int minRoomHeight,
int maxRoomHeight)
horizontalRooms - How many rooms will be made horizontallyverticalRooms - How many rooms will be made verticallydungeonWidth - How wide the total dungeon will bedungeonHeight - How high the total dungeon will beminRoomWidth - The minimum width a room can bemaxRoomWidth - The maximum width a room can beminRoomHeight - The minimum height a room can bemaxRoomHeight - The maximum height a room can bepublic ClassicRogueMapGenerator(int horizontalRooms,
int verticalRooms,
int dungeonWidth,
int dungeonHeight,
int minRoomWidth,
int maxRoomWidth,
int minRoomHeight,
int maxRoomHeight,
IRNG rng)
horizontalRooms - How many rooms will be made horizontallyverticalRooms - How many rooms will be made verticallydungeonWidth - How wide the total dungeon will bedungeonHeight - How high the total dungeon will beminRoomWidth - The minimum width a room can bemaxRoomWidth - The maximum width a room can beminRoomHeight - The minimum height a room can bemaxRoomHeight - The maximum height a room can bepublic char[][] generate()
generate in interface IDungeonGeneratorpublic char[][] getDungeon()
IDungeonGeneratorIDungeonGenerator.generate() or
some similar method present in a specific implementation. This normally passes a direct reference and not a copy,
so you can normally modify the returned array to propagate changes back into this IDungeonGenerator.getDungeon in interface IDungeonGeneratorCopyright © Eben Howard 2012–2022. All rights reserved.