public class SymmetryDungeonGenerator extends MixedGenerator
MixedGenerator
that creates bi-radially symmetric maps (basically a yin-yang shape). Useful for
strategy games and possibly competitive multi-player games. The Coords passed to constructors as room positions do
not necessarily need to be
Created by Tommy Ettinger on 11/20/2015.MixedGenerator.CarverType
carvers, CAVE_FLOOR, CAVE_WALL, CORRIDOR_FLOOR, CORRIDOR_WALL, dungeon, environment, fixedRooms, generated, height, marked, points, rng, ROOM_FLOOR, ROOM_WALL, roomHeight, roomWidth, totalPoints, UNTOUCHED, walled, width
Constructor and Description |
---|
SymmetryDungeonGenerator(int width,
int height,
RNG rng)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SymmetryDungeonGenerator(int width,
int height,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SymmetryDungeonGenerator(int width,
int height,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections,
float roomSizeMultiplier)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SymmetryDungeonGenerator(int width,
int height,
RNG rng,
List<Coord> sequence)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
Modifier and Type | Method and Description |
---|---|
protected static LinkedHashMap<Coord,List<Coord>> |
crossConnect(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
protected static LinkedHashMap<Coord,List<Coord>> |
listToMap(List<Coord> sequence) |
protected boolean |
mark(int x,
int y)
Internal use.
|
protected void |
markEnvironment(int x,
int y,
int kind)
Internal use.
|
protected void |
markPiercing(int x,
int y)
Internal use.
|
static LinkedHashMap<Coord,List<Coord>> |
removeSomeOverlap(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
static LinkedHashMap<Coord,List<Coord>> |
removeSomeOverlap(int width,
int height,
List<Coord> sequence) |
protected void |
wallOff(int x,
int y)
Internal use.
|
basicPoints, generate, getEnvironment, getFixedRooms, hasGenerated, mark, markEnvironmentCave, markEnvironmentCorridor, markEnvironmentRoom, markEnvironmentWalls, markPiercing, markPiercingCave, markPiercingRoom, putBoxRoomCarvers, putCaveCarvers, putRoundRoomCarvers, putWalledBoxRoomCarvers, putWalledRoundRoomCarvers, setFixedRooms, store
public SymmetryDungeonGenerator(int width, int height, RNG rng)
width
- the width of the final map in cellsheight
- the height of the final map in cellsrng
- an RNG object to use for random choices; this make a lot of random choices.used to ensure spacing for the points.
public SymmetryDungeonGenerator(int width, int height, RNG rng, List<Coord> sequence)
width
- the width of the final map in cellsheight
- the height of the final map in cellsrng
- an RNG object to use for random choices; this make a lot of random choices.sequence
- a List of Coord to connect in order; index 0 is the start, index size() - 1 is the end.a class that uses this technique
public SymmetryDungeonGenerator(int width, int height, RNG rng, LinkedHashMap<Coord,List<Coord>> connections)
width
- the width of the final map in cellsheight
- the height of the final map in cellsrng
- an RNG object to use for random choices; this make a lot of random choices.connections
- a Map of Coord keys to arrays of Coord to connect to next; shouldn't connect both waysa class that uses this technique
public SymmetryDungeonGenerator(int width, int height, RNG rng, LinkedHashMap<Coord,List<Coord>> connections, float roomSizeMultiplier)
width
- the width of the final map in cellsheight
- the height of the final map in cellsrng
- an RNG object to use for random choices; this make a lot of random choices.connections
- a Map of Coord keys to arrays of Coord to connect to next; shouldn't connect both waysroomSizeMultiplier
- a float multiplier that will be applied to each room's width and heighta class that uses this technique
public static LinkedHashMap<Coord,List<Coord>> removeSomeOverlap(int width, int height, List<Coord> sequence)
public static LinkedHashMap<Coord,List<Coord>> removeSomeOverlap(int width, int height, LinkedHashMap<Coord,List<Coord>> connections)
protected static LinkedHashMap<Coord,List<Coord>> crossConnect(int width, int height, LinkedHashMap<Coord,List<Coord>> connections)
protected boolean mark(int x, int y)
mark
in class MixedGenerator
x
- x position to marky
- y position to markprotected void markPiercing(int x, int y)
markPiercing
in class MixedGenerator
x
- x position to marky
- y position to markprotected void wallOff(int x, int y)
wallOff
in class MixedGenerator
x
- x position to marky
- y position to markprotected void markEnvironment(int x, int y, int kind)
markEnvironment
in class MixedGenerator
x
- x position to marky
- y position to markkind
- an int that should be one of the constants in MixedGenerator for environment types.Copyright © 2012–2016. All rights reserved.