Package | Description |
---|---|
squidpony |
Utilities that don't fit elsewhere in SquidLib, like text manipulation, some interfaces, and compatibility code.
|
squidpony.squidai |
Tools for finding paths, optimizing targets for area-of-effect (AOE) abilities, and evaluating influence on a grid.
|
squidpony.squidgrid |
Tools for working with data on a grid, including LOS and FOV; overlaps with geometry code in squidpony.squidmath .
|
squidpony.squidgrid.mapping |
Tools specifically for generating maps and placing content in them, usually working with 2D char arrays.
|
squidpony.squidgrid.mapping.styled |
Support code for working with tiled dungeon generation; normally only TilesetType is used outside SquidLib.
|
squidpony.squidmath |
A very broad package containing random number generators, geometry tools, and some classes for combinatorics.
|
Modifier and Type | Method and Description |
---|---|
protected String[] |
FakeLanguageGen.accentBoth(RNG rng,
String[] me,
double vowelInfluence,
double consonantInfluence) |
protected String[] |
FakeLanguageGen.accentConsonants(RNG rng,
String[] me,
double influence) |
protected String[] |
FakeLanguageGen.accentVowels(RNG rng,
String[] me,
double influence) |
T |
IColorCenter.getRandom(RNG rng,
int opacity) |
T |
IColorCenter.Skeleton.getRandom(RNG rng,
int opacity) |
protected String[] |
FakeLanguageGen.merge1000(RNG rng,
String[] me,
String[] other,
double otherInfluence) |
MonsterGen.Chimera |
MonsterGen.Chimera.mix(RNG rng,
String newName,
MonsterGen.Chimera other,
double otherInfluence)
Fuse two Chimera objects by some fraction of influence, using the given RNG and possibly renaming the
creature.
|
StringBuilder |
FakeLanguageGen.Modifier.modify(RNG rng,
StringBuilder sb) |
MonsterGen.Chimera |
MonsterGen.randomize(RNG rng,
String newName,
int detail)
Randomly add appearance and power descriptors to a new Chimera creature with random body part adjectives.
|
MonsterGen.Chimera |
MonsterGen.randomizeAppearance(RNG rng,
MonsterGen.Chimera creature,
String newName,
int adjectiveCount)
Randomly add appearance descriptors to a copy of the Chimera creature.
|
MonsterGen.Chimera |
MonsterGen.randomizePowers(RNG rng,
MonsterGen.Chimera creature,
String newName,
int powerCount)
Randomly add power descriptors to a copy of the Chimera creature.
|
String |
MonsterGen.randomName(RNG rng)
Gets a random name as a String using FakeLanguageGen.
|
String |
FakeLanguageGen.sentence(RNG rng,
int minWords,
int maxWords,
String[] midPunctuation,
String[] endPunctuation,
double midPunctuationFrequency)
Generate a sentence from this FakeLanguageGen using the specific RNG.
|
String |
FakeLanguageGen.sentence(RNG rng,
int minWords,
int maxWords,
String[] midPunctuation,
String[] endPunctuation,
double midPunctuationFrequency,
int maxChars)
Generate a sentence from this FakeLanguageGen using the specific RNG that fits in the given length limit.
|
String |
FakeLanguageGen.word(RNG rng,
boolean capitalize)
Generate a word from this FakeLanguageGen using the specified RNG.
|
String |
FakeLanguageGen.word(RNG rng,
boolean capitalize,
int approxSyllables)
Generate a word from this FakeLanguageGen using the specified RNG.
|
Constructor and Description |
---|
Thesaurus(RNG rng)
Constructs a new Thesaurus, seeding its RNG (used to shuffle word order) with the next long from the given RNG.
|
WeightedLetterNamegen(String[] names,
int consonantLimit,
RNG rng)
Creates the generator by seeding the provided list of names.
|
Modifier and Type | Field and Description |
---|---|
RNG |
WaypointPathfinder.rng |
RNG |
DijkstraMap.rng
The RNG used to decide which one of multiple equally-short paths to take.
|
Constructor and Description |
---|
DijkstraMap(char[][] level,
DijkstraMap.Measurement measurement,
RNG rng)
Constructor meant to take a char[][] returned by DungeonGen.generate(), or any other
char[][] where '#' means a wall and anything else is a walkable tile.
|
DijkstraMap(char[][] level,
RNG rng)
Constructor meant to take a char[][] returned by DungeonGen.generate(), or any other
char[][] where '#' means a wall and anything else is a walkable tile.
|
DijkstraMap(RNG random)
Construct a DijkstraMap without a level to actually scan.
|
WaypointPathfinder(char[][] map,
DijkstraMap dijkstra,
RNG rng)
Calculates and stores the doors and doors-like connections ("chokepoints") on the given map as waypoints.
|
WaypointPathfinder(char[][] map,
Radius measurement,
RNG rng)
Calculates and stores the doors and doors-like connections ("chokepoints") on the given map as waypoints.
|
WaypointPathfinder(char[][] map,
Radius measurement,
RNG rng,
boolean thickCorridors)
Calculates and stores the doors and doors-like connections ("chokepoints") on the given map as waypoints.
|
WaypointPathfinder(char[][] map,
Radius measurement,
RNG rng,
int fraction)
Calculates and stores the specified fraction of walkable points from map as waypoints.
|
Modifier and Type | Field and Description |
---|---|
RNG |
SoundMap.rng
The RNG used to decide which one of multiple equally-short paths to take.
|
Modifier and Type | Method and Description |
---|---|
static boolean[][] |
MimicFill.fill(boolean[][] sample,
int size,
double temperature,
int iterations,
RNG random) |
Coord |
Radius.onUnitShape(double distance,
RNG rng) |
Coord3D |
Radius.onUnitShape3D(double distance,
RNG rng) |
List<Coord> |
Splash.spill(RNG rng,
char[][] level,
Coord start,
int volume) |
static List<Coord> |
Splash.spill(RNG rng,
char[][] level,
Coord start,
int volume,
Set<Character> impassable) |
Constructor and Description |
---|
MultiSpill(char[][] level,
Spill.Measurement measurement,
RNG random)
Constructor meant to take a char[][] returned by DungeonGen.generate(), or any other
char[][] where '#' means a wall and anything else is a walkable tile.
|
MultiSpill(RNG random)
Construct a Spill without a level to actually scan.
|
SoundMap(RNG random)
Construct a SoundMap without a level to actually scan.
|
Spill(char[][] level,
Spill.Measurement measurement,
RNG random)
Constructor meant to take a char[][] returned by DungeonGen.generate(), or any other
char[][] where '#' means a wall and anything else is a walkable tile.
|
Spill(RNG random)
Construct a Spill without a level to actually scan.
|
Modifier and Type | Field and Description |
---|---|
protected RNG |
LanesMapGenerator.random |
RNG |
PacMazeGenerator.rng |
RNG |
OrganicMapGenerator.rng |
RNG |
MixedGenerator.rng |
RNG |
DenseRoomMapGenerator.rng |
Modifier and Type | Method and Description |
---|---|
protected static List<Coord> |
MixedGenerator.basicPoints(int width,
int height,
RNG rng)
Internal use.
|
static Coord |
DungeonUtility.getRandomCell(RNG rng,
char[][] map,
Set<Character> acceptable,
int frustration) |
static double[][] |
MapFactory.heightMap(int width,
int height,
RNG rng)
Returns a randomly generated map of doubles.
|
Constructor and Description |
---|
ClassicRogueMapGenerator(int horizontalRooms,
int verticalRooms,
int dungeonWidth,
int dungeonHeight,
int minRoomWidth,
int maxRoomWidth,
int minRoomHeight,
int maxRoomHeight,
RNG rng)
Initializes the generator to turn out random dungeons within the specific
parameters.
|
DenseRoomMapGenerator(int width,
int height,
RNG rng) |
DividedMazeGenerator(int width,
int height,
RNG rng)
Sets up the generator to make mazes the given width and height.
|
DungeonGenerator(int width,
int height,
RNG rng)
Make a DungeonGenerator with the given height, width, and RNG.
|
DungeonUtility(RNG rng) |
GrowingTreeMazeGenerator(int width,
int height,
RNG rng) |
LanesMapGenerator(int width,
int height,
RNG rng,
int lanes)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
LegacyDungeonGenerator(int width,
int height,
RNG rng)
Deprecated.
Make a DungeonGenerator with the given height, width, and RNG.
|
MixedGenerator(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.
|
MixedGenerator(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.
|
MixedGenerator(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.
|
MixedGenerator(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.
|
ModularMapGenerator(int width,
int height,
RNG rng)
Make a ModularMapGenerator with the given height, width, and RNG.
|
OrganicMapGenerator(double noiseMin,
double noiseMax,
int width,
int height,
RNG rng) |
OrganicMapGenerator(int width,
int height,
RNG rng) |
PacMazeGenerator(int width,
int height,
RNG rng) |
SectionDungeonGenerator(int width,
int height,
RNG rng)
Make a DungeonGenerator with the given height, width, and RNG.
|
SerpentDeepMapGenerator(int width,
int height,
int depth,
RNG rng)
This prepares a map generator that will generate a map with the given width, height and depth, using the given
RNG.
|
SerpentDeepMapGenerator(int width,
int height,
int depth,
RNG rng,
double branchingChance)
This prepares a map generator that will generate a map with the given width, height and depth, using the given
RNG, and will branch out to other nearby rooms that (probably) do not have staircases between layers.
|
SerpentMapGenerator(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.
|
SerpentMapGenerator(int width,
int height,
RNG rng,
boolean symmetrical)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SerpentMapGenerator(int width,
int height,
RNG rng,
double branchingChance)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SerpentMapGenerator(int width,
int height,
RNG rng,
double branchingChance,
boolean symmetrical)
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)
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 | Field and Description |
---|---|
RNG |
DungeonBoneGen.rng
The current RNG, a squidpony.squidmath.RNG
|
Modifier and Type | Method and Description |
---|---|
RNG |
DungeonBoneGen.getRng()
Gets the current RNG.
|
Modifier and Type | Method and Description |
---|---|
void |
DungeonBoneGen.setRng(RNG rng)
Sets the current RNG.
|
Constructor and Description |
---|
DungeonBoneGen(RNG random)
Constructs a DungeonGen that uses the given squidpony.squidmath.RNG.
|
Modifier and Type | Class and Description |
---|---|
class |
DeckRNG
An RNG variant that has 16 possible grades of value it can produce and shuffles them like a deck of cards.
|
class |
DharmaRNG
An alteration to a RandomnessSource that attempts to produce values that are perceived as fair to an imperfect user.
|
class |
EditRNG
A subclass of StatefulRNG (and thus RNG) that allows customizing many parts of the random number generation.
|
class |
StatefulRNG
A slight variant on RNG that always uses a stateful RandomessSource and so can have its state
set or retrieved using setState() or getState().
|
Modifier and Type | Field and Description |
---|---|
RNG |
RandomBias.rng |
RNG |
GapShuffler.rng |
Modifier and Type | Method and Description |
---|---|
RNG |
StatefulRNG.copy()
Creates a copy of this StatefulRNG; it will generate the same random numbers, given the same calls in order, as
this StatefulRNG at the point copy() is called.
|
RNG |
RNG.copy()
Creates a copy of this RNG; it will generate the same random numbers, given the same calls in order, as this RNG
at the point copy() is called.
|
RNG |
EditRNG.copy()
Creates a copy of this StatefulRNG; it will generate the same random numbers, given the same calls in order, as
this StatefulRNG at the point copy() is called.
|
RNG |
DharmaRNG.copy()
Creates a copy of this DharmaRNG; it will generate the same random numbers, given the same calls in order, as
this DharmaRNG at the point copy() is called.
|
RNG |
DeckRNG.copy()
Creates a copy of this DeckRNG; it will generate the same random numbers, given the same calls in order, as
this DeckRNG at the point copy() is called.
|
Modifier and Type | Method and Description |
---|---|
Coord |
Region.getRandomCoord(RNG rng)
Gets a single random Coord from this using the given RNG (which can be seeded); returns null if this is empty.
|
static List<Coord> |
WobblyLine.line(int startX,
int startY,
int endX,
int endY,
int width,
int height,
double weight,
RNG rng)
Draws a line from (startX, startY) to (endX, endY) using the Drunkard's Walk algorithm.
|
static ArrayList<Coord> |
CoordPacker.randomPortion(short[] packed,
int size,
RNG rng)
Gets a fixed number of randomly chosen positions that are "on" in the given packed array, without unpacking it,
and returns a List of Coord with a count equal to size (or less if there aren't enough "on" cells).
|
static Coord[] |
CoordPacker.randomSample(short[] packed,
double fraction,
RNG rng)
Gets a random subset of positions that are "on" in the given packed array, without unpacking it, and returns
them as a Coord[].
|
Region |
Region.randomSeparated(int separation,
RNG rng)
Takes this region and walks through its Coords in chunks with length equal to separation, creating a new Region
where one randomly-chosen Coord in each chunk is kept and the others are discarded.
|
static Coord[] |
CoordPacker.randomSeparated(short[] packed,
int separation,
RNG rng)
Gets the positions that are "on" in the given packed array, without unpacking it, repeatedly goes through a
number of "on" cells equal to fraction and stores a random one of those cells as a Coord, and returns the
accumulated random portion of positions as a Coord[].
|
static Coord |
PoissonDisk.randomUnblockedTile(Coord minPosition,
Coord maxPosition,
char[][] map,
RNG rng,
HashSet<Character> blocked)
Finds a random Coord where the x and y match up to a [x][y] location on map that has any value not in blocking.
|
static ArrayList<Coord> |
PoissonDisk.sampleCircle(Coord center,
float radius,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
RNG rng)
Get a list of Coords, each randomly positioned around the given center out to the given radius (measured with
Euclidean distance, so a true circle), but with the given minimum distance from any other Coord in the list.
|
static ArrayList<Coord> |
PoissonDisk.sampleMap(char[][] map,
float minimumDistance,
RNG rng,
Character... blocking) |
static ArrayList<Coord> |
PoissonDisk.sampleMap(Coord minPosition,
Coord maxPosition,
char[][] map,
float minimumDistance,
RNG rng,
Character... blocking) |
static ArrayList<Coord> |
PoissonDisk.sampleRectangle(Coord minPosition,
Coord maxPosition,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
RNG rng)
Get a list of Coords, each randomly positioned within the rectangle between the given minPosition and
maxPosition, but with the given minimum distance from any other Coord in the list.
|
void |
Dice.setRandom(RNG rng)
Sets the random number generator to be used.
|
static Coord |
CoordPacker.singleRandom(short[] packed,
RNG rng)
Gets a single randomly chosen position that is "on" in the given packed array, without unpacking it, and returns
it as a Coord or returns null of the array is empty.
|
static short[] |
CoordPacker.spill(short[] bounds,
short[] start,
int volume,
RNG rng)
Given a packed array encoding a larger area, a packed array encoding one or more points inside bounds, an RNG,
and a volume in cells, expands a random cell in start in a random Manhattan (diamond) direction equal, then
continues to expand from random cells in start or the expanded area until it has filled volume cells, limiting
any expansion to within bounds and returning the final expanded (limited) packed data.
|
Constructor and Description |
---|
Dice(RNG rng)
Creates a new dice roller that uses the given RNG, which can be seeded before it's given here.
|
GapShuffler(Collection<T> elements,
RNG rng)
Constructor that takes any Collection of T, shuffles it with the given RNG, and can then iterate infinitely
through mostly-random shuffles of the given collection.
|
NeuralParticle(int width,
int height,
int maxDistance,
RNG rng) |
ProbabilityTable(RNG rng)
Creates a new probability table with the provided source of randomness
used.
|
RandomBias(RNG rng) |
RandomBias(RNG rng,
Map<String,Double> mapping) |
RandomBias(RNG rng,
Map<String,Double> mapping,
int distribution) |
Copyright © 2012–2016. All rights reserved.