Package | Description |
---|---|
squidpony |
Utilities that don't fit elsewhere in SquidLib; mostly text manipulation, compression, and helper code.
|
squidpony.squidai |
Tools for finding paths, optimizing targets for area-of-effect (AOE) abilities, and evaluating influence on a grid.
|
squidpony.squidai.graph |
Graphs and graph algorithms used primarily (but not exclusively) for pathfinding.
|
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.squidmath |
A very broad package containing random number generators, geometry tools, data structures, and noise functions.
|
Modifier and Type | Field and Description |
---|---|
static OrderedMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
Thesaurus.adjective |
static OrderedMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
Thesaurus.categories |
static OrderedMap<java.lang.CharSequence,FakeLanguageGen> |
Thesaurus.languages |
OrderedMap<java.lang.CharSequence,GapShuffler<java.lang.String>> |
Thesaurus.mappings |
static OrderedMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
Thesaurus.noun |
static OrderedMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
Thesaurus.nouns |
static OrderedMap<java.lang.CharSequence,java.lang.Integer> |
Thesaurus.numberAdjectives |
static OrderedMap<java.lang.CharSequence,java.lang.Integer> |
Thesaurus.numbers |
OrderedMap<java.lang.String,java.util.List<java.lang.String>> |
MonsterGen.Chimera.parts |
Modifier and Type | Method and Description |
---|---|
OrderedMap<java.lang.String,java.lang.String> |
ObText.basicOrderedMap()
Gets all unique Strings from the top level of this ObText as keys in an
OrderedMap , with the first String
associated with each key as its value (or null if nothing is associated with a key String). |
static <K,V> OrderedMap<K,V> |
Maker.makeOM()
Makes an empty OrderedMap (OM); needs key and value types to be specified in order to work.
|
static <K,V> OrderedMap<K,V> |
Maker.makeOM(float factor,
K k0,
V v0,
java.lang.Object... rest)
Makes an OrderedMap (OM) with the given load factor (which should be between 0.1 and 0.9), key and value types
inferred from the types of k0 and v0, and considers all remaining parameters key-value pairs, casting the Objects
at positions 0, 2, 4...
|
static <K,V> OrderedMap<K,V> |
Maker.makeOM(K k0,
V v0,
java.lang.Object... rest)
Makes an OrderedMap (OM) with key and value types inferred from the types of k0 and v0, and considers all
parameters key-value pairs, casting the Objects at positions 0, 2, 4...
|
OrderedMap<java.lang.String,java.util.ArrayList<java.lang.String>> |
ObText.shallowOrderedMap()
Gets all unique Strings from the top level of this ObText as keys in an
OrderedMap , with any Strings
associated with those keys as their values (in a possibly-empty ArrayList of String for each value). |
Modifier and Type | Method and Description |
---|---|
static <K,V> StringConvert<OrderedMap<K,V>> |
Converters.convertOrderedMap(java.lang.CharSequence typeK,
java.lang.CharSequence typeV) |
static <K,V> StringConvert<OrderedMap<K,V>> |
Converters.convertOrderedMap(java.lang.Class<K> typeK,
java.lang.Class<V> typeV) |
static <K,V> StringConvert<OrderedMap<K,V>> |
Converters.convertOrderedMap(StringConvert<K> convertK,
StringConvert<V> convertV) |
Modifier and Type | Method and Description |
---|---|
static FakeLanguageGen.Modifier |
FakeLanguageGen.Modifier.replacementTable(OrderedMap<java.lang.String,java.lang.String> map)
Creates a Modifier that will replace the nth String key in map with the nth value.
|
Modifier and Type | Method and Description |
---|---|
OrderedMap<Coord,java.lang.Double> |
Technique.apply(Coord user,
Coord aimAt)
This does one last validation of the location aimAt (checking that it is within the valid range for this
Technique) before getting the area affected by the AOE targeting that cell.
|
static OrderedMap<Coord,java.lang.Double> |
AreaUtils.arrayToHashMap(boolean[][] map)
This takes a 2D boolean array and returns a HashMap of Coord keys to Double values, but will only use the value
1.0, and only for positions in map that have as their boolean element true.
|
static OrderedMap<Coord,java.lang.Double> |
AreaUtils.arrayToHashMap(double[][] map)
This takes a 2D double array called map and returns a HashMap of Coord keys to Double values, and will have a key
for every position in map that is greater than 0.0, with values equal to those in map.
|
static OrderedMap<Coord,java.lang.Double> |
AreaUtils.arrayToHashMap(double[][] map,
double cutoff)
This takes a 2D double array and returns a HashMap of Coord keys to Double values, but will only use the value
1.0, and only does this if the passed double[][] has a value at that position that is greater than cutoff.
|
static OrderedMap<Coord,java.lang.Double> |
AreaUtils.dijkstraToHashMap(double[][] map)
This takes a DijkstraMap that has already completed a scan() and returns a HashMap of Coord keys to Double
values, and will have a key for every position that was reached in the DijkstraMap, with 1.0 as the only value.
|
OrderedMap<Coord,java.lang.Double> |
AOE.findArea()
This is how an AOE interacts with anything that uses it.
|
OrderedMap<Coord,java.lang.Double> |
BeamAOE.findArea() |
OrderedMap<Coord,java.lang.Double> |
BlastAOE.findArea() |
OrderedMap<Coord,java.lang.Double> |
BurstAOE.findArea() |
OrderedMap<Coord,java.lang.Double> |
CloudAOE.findArea() |
OrderedMap<Coord,java.lang.Double> |
ConeAOE.findArea() |
OrderedMap<Coord,java.lang.Double> |
LineAOE.findArea() |
OrderedMap<Coord,java.lang.Double> |
PointAOE.findArea() |
OrderedMap<Coord,java.lang.Double> |
DijkstraMap.floodFill(int radius,
Coord... starts)
A simple limited flood-fill that returns a OrderedMap of Coord keys to the Double values in the DijkstraMap, only
calculating out to a number of steps determined by limit.
|
OrderedMap<Coord,java.util.ArrayList<Coord>> |
AOE.idealLocations(java.util.Collection<Coord> targets,
java.util.Collection<Coord> requiredExclusions)
Returns a OrderedMap of Coord keys and ArrayList of Coord values, where each Coord key is an ideal location to
hit as many of the Points in targets as possible without hitting any Points in requiredExclusions, and each value
is the collection of targets that will be hit if the associated key is used.
|
OrderedMap<Coord,java.util.ArrayList<Coord>> |
BeamAOE.idealLocations(java.util.Collection<Coord> targets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
BlastAOE.idealLocations(java.util.Collection<Coord> targets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
BurstAOE.idealLocations(java.util.Collection<Coord> targets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
CloudAOE.idealLocations(java.util.Collection<Coord> targets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
ConeAOE.idealLocations(java.util.Collection<Coord> targets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
LineAOE.idealLocations(java.util.Collection<Coord> targets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
PointAOE.idealLocations(java.util.Collection<Coord> targets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
AOE.idealLocations(java.util.Collection<Coord> priorityTargets,
java.util.Collection<Coord> lesserTargets,
java.util.Collection<Coord> requiredExclusions)
A variant of idealLocations that takes two groups of desirable targets, and will rate locations by how many
priorityTargets are in the AOE, then by how many lesserTargets are in the AOE, and will only consider locations
that do not affect a Coord in requiredExclusions.
|
OrderedMap<Coord,java.util.ArrayList<Coord>> |
BeamAOE.idealLocations(java.util.Collection<Coord> priorityTargets,
java.util.Collection<Coord> lesserTargets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
BlastAOE.idealLocations(java.util.Collection<Coord> priorityTargets,
java.util.Collection<Coord> lesserTargets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
BurstAOE.idealLocations(java.util.Collection<Coord> priorityTargets,
java.util.Collection<Coord> lesserTargets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
CloudAOE.idealLocations(java.util.Collection<Coord> priorityTargets,
java.util.Collection<Coord> lesserTargets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
ConeAOE.idealLocations(java.util.Collection<Coord> priorityTargets,
java.util.Collection<Coord> lesserTargets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
LineAOE.idealLocations(java.util.Collection<Coord> priorityTargets,
java.util.Collection<Coord> lesserTargets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
PointAOE.idealLocations(java.util.Collection<Coord> priorityTargets,
java.util.Collection<Coord> lesserTargets,
java.util.Collection<Coord> requiredExclusions) |
OrderedMap<Coord,java.util.ArrayList<Coord>> |
Technique.idealLocations(Coord user,
java.util.Collection<Coord> targets,
java.util.Collection<Coord> requiredExclusions)
Get a mapping of Coord keys representing locations to apply this Technique to, to ArrayList of Coord values
representing which targets (by their location) are affected by choosing that Coord.
|
OrderedMap<Coord,java.util.ArrayList<Coord>> |
Technique.idealLocations(Coord user,
java.util.Set<Coord> priorityTargets,
java.util.Set<Coord> lesserTargets,
java.util.Set<Coord> requiredExclusions)
Get a mapping of Coord keys representing locations to apply this Technique to, to ArrayList of Coord values
representing which targets (by their location) are effected by choosing that Coord.
|
Modifier and Type | Field and Description |
---|---|
protected OrderedMap<Connection<V>,Connection<V>> |
Graph.edgeMap |
protected OrderedMap<V,Node<V>> |
Graph.vertexMap |
Modifier and Type | Field and Description |
---|---|
OrderedMap<Coord,java.lang.Double> |
SoundMap.alerted
The latest results of findAlerted(), with Coord keys representing the positions of creatures that were alerted
and Double values representing how loud the sound was when it reached them.
|
protected OrderedMap<I,SpatialMap.SpatialTriple<I,E>> |
SpatialMap.itemMapping |
protected OrderedMap<Coord,SpatialMap.SpatialTriple<I,E>> |
SpatialMap.positionMapping |
OrderedMap<Coord,java.lang.Double> |
SoundMap.sounds
Sources of sound on the map; keys are positions, values are how loud the noise is (10.0 should spread 10 cells
away, with diminishing values assigned to further positions).
|
Modifier and Type | Method and Description |
---|---|
OrderedMap<Coord,java.lang.Double> |
SoundMap.findAlerted(java.util.Set<Coord> creatures,
java.util.Map<Coord,java.lang.Double> extraSounds)
Scans the dungeon using SoundMap.scan(), adding any positions in extraSounds to the group of known sounds before
scanning.
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<java.util.ArrayList<Coord>> |
MultiSpill.start(OrderedMap<Coord,java.lang.Double> entries,
int volume,
java.util.Collection<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
Modifier and Type | Field and Description |
---|---|
OrderedMap<java.lang.Character,FantasyPoliticalMapper.Faction> |
FantasyPoliticalMapper.atlas
Maps chars, as found in the returned array from generate(), to Strings that store the full name of nations.
|
OrderedMap<java.lang.Character,java.lang.String> |
PoliticalMapper.atlas
Maps chars, as found in the returned array from generate(), to Strings that store the full name of nations.
|
OrderedMap<java.lang.Character,java.lang.String> |
SpillWorldMap.atlas |
OrderedMap<java.lang.Character,java.lang.String> |
PoliticalMapper.briefAtlas
Maps chars, as found in the returned array from generate(), to Strings that store the short name of nations.
|
OrderedMap<GreasedRegion,java.util.List<GreasedRegion>> |
RoomFinder.caves
Not likely to be used directly, but there may be things you can do with these that are cumbersome using only
RoomFinder's simpler API.
|
OrderedMap<GreasedRegion,java.util.List<GreasedRegion>> |
RoomFinder.corridors
Not likely to be used directly, but there may be things you can do with these that are cumbersome using only
RoomFinder's simpler API.
|
OrderedMap<Coord,MapModule> |
ModularMapGenerator.displacement |
OrderedMap<java.lang.Integer,java.util.ArrayList<MapModule>> |
ModularMapGenerator.modules |
OrderedMap<GreasedRegion,java.util.List<GreasedRegion>> |
RoomFinder.rooms
Not likely to be used directly, but there may be things you can do with these that are cumbersome using only
RoomFinder's simpler API.
|
OrderedMap<java.lang.Character,java.util.List<FakeLanguageGen>> |
PoliticalMapper.spokenLanguages
Maps chars, as found in the returned array from generate(), to Strings that store the languages spoken in those
nations, which could be user-assigned, unassigned, or randomly-generated.
|
Modifier and Type | Method and Description |
---|---|
protected static OrderedMap<Coord,java.util.List<Coord>> |
SymmetryDungeonGenerator.crossConnect(int width,
int height,
java.util.Map<Coord,java.util.List<Coord>> connections) |
protected static OrderedMap<Coord,java.util.List<Coord>> |
SymmetryDungeonGenerator.listToMap(java.util.List<Coord> sequence) |
static OrderedMap<Coord,java.util.List<Coord>> |
SymmetryDungeonGenerator.removeSomeOverlap(int width,
int height,
java.util.Collection<Coord> sequence) |
static OrderedMap<Coord,java.util.List<Coord>> |
SymmetryDungeonGenerator.removeSomeOverlap(int width,
int height,
java.util.Map<Coord,java.util.List<Coord>> connections) |
protected static OrderedMap<Coord,java.util.List<Coord>> |
SymmetryDungeonGenerator.setToMap(OrderedSet<Coord> sequence) |
Modifier and Type | Method and Description |
---|---|
char[][] |
PoliticalMapper.generate(GreasedRegion land,
OrderedMap<java.lang.Character,FakeLanguageGen> atlasLanguages,
double controlledFraction)
Produces a political map for the land stored in the "on" cells of the given GreasedRegion, with the given number
of factions trying to take land in the world (essentially, nations).
|
char[][] |
PoliticalMapper.generate(WorldMapGenerator wmg,
OrderedMap<java.lang.Character,FakeLanguageGen> atlasLanguages,
double controlledFraction)
Produces a political map for the land stored in the given WorldMapGenerator, with the given number
of factions trying to take land in the world (essentially, nations).
|
Constructor and Description |
---|
SymmetryDungeonGenerator(int width,
int height,
IRNG rng,
OrderedMap<Coord,java.util.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,
IRNG rng,
OrderedMap<Coord,java.util.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.
|
Modifier and Type | Class and Description |
---|---|
class |
EnumOrderedMap<K extends java.lang.Enum<?>,V>
A simple alternative to EnumMap that has a zero-argument constructor (which makes serialization easier) but is a
little less efficient.
|
class |
RegionMap<V>
A small extension of OrderedMap that specifically handles
short[] regions as produced by CoordPacker . |
Modifier and Type | Method and Description |
---|---|
OrderedMap<K,V> |
OrderedMap.clone()
Returns a deep copy of this map.
|
static <K,V> OrderedMap<K,V> |
OrderedMap.makeMap()
Makes an empty OrderedMap (OM); needs key and value types to be specified in order to work.
|
static <K,V> OrderedMap<K,V> |
OrderedMap.makeMap(K k0,
V v0,
java.lang.Object... rest)
Makes an OrderedMap (OM) with the given load factor (which should be between 0.1 and 0.9), key and value types
inferred from the types of k0 and v0, and considers all remaining parameters key-value pairs, casting the Objects
at positions 0, 2, 4...
|
OrderedMap<K,V> |
OrderedMap.putPairs(K k0,
V v0,
java.lang.Object... rest)
Given alternating key and value arguments in pairs, puts each key-value pair into this OrderedMap as if by
calling
put(Object, Object) repeatedly for each pair. |
OrderedMap<K,V> |
OrderedMap.reorder(int... ordering)
Given an array or varargs of replacement indices for this OrderedMap's iteration order, reorders this so the
first item in the returned version is the same as
getAt(ordering[0]) (with some care taken for negative
or too-large indices), the second item in the returned version is the same as getAt(ordering[1]) , etc. |
OrderedMap<K,V> |
OrderedMap.shuffle(IRNG rng)
Randomly alters the iteration order for this OrderedMap using the given IRNG to shuffle.
|
Modifier and Type | Method and Description |
---|---|
ProbabilityTable<T> |
ProbabilityTable.addAll(OrderedMap<T,java.lang.Integer> itemsAndWeights)
Given an OrderedMap of T element keys and Integer weight values, adds all T keys with their corresponding weights
into this ProbabilityTable.
|
ProbabilityTable<T> |
ProbabilityTable.addAllNested(OrderedMap<ProbabilityTable<T>,java.lang.Integer> itemsAndWeights)
Given an OrderedMap of ProbabilityTable keys and Integer weight values, adds all keys as nested tables with their
corresponding weights into this ProbabilityTable.
|
boolean |
ProbabilityTable.removeAll(OrderedMap<T,java.lang.Integer> itemsAndWeights)
Given an OrderedMap of T item keys and Integer weight values, reduces the weights in this ProbabilityTable for
all T keys by their corresponding weights, removing them if the weight becomes 0 or less.
|
Copyright © Eben Howard 2012–2022. All rights reserved.