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.iterator |
Iterators that allow traversal of
Coord points on a map's grid. |
squidpony.squidgrid.mapping |
Tools specifically for generating maps and placing content in them, usually working with 2D char arrays.
|
squidpony.squidgrid.zone |
Ways to represent different types of areas in 2D space; not recommended, most new code uses
GreasedRegion . |
squidpony.squidmath |
A very broad package containing random number generators, geometry tools, data structures, and noise functions.
|
Modifier and Type | Field and Description |
---|---|
static StringConvert<Coord> |
Converters.convertCoord |
Modifier and Type | Field and Description |
---|---|
Coord |
Threat.position |
Coord[][] |
DijkstraMap.targetMap |
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<Coord> |
DijkstraMap.path
The latest path that was obtained by calling findPath().
|
Modifier and Type | Method and Description |
---|---|
Coord |
DijkstraMap.decode(int encoded)
If you for some reason have one of the internally-used ints produced by
DijkstraMap.encode(Coord) , this will convert
it back to a Coord if you need it as such. |
Coord |
DijkstraMap.findNearest(Coord start,
java.util.Collection<Coord> targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first target found.
|
Coord |
DijkstraMap.findNearest(Coord start,
Coord... targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first target found.
|
Coord |
BlastAOE.getCenter() |
Coord |
BurstAOE.getCenter() |
Coord |
CloudAOE.getCenter() |
Coord |
PointAOE.getCenter() |
Coord |
BeamAOE.getEnd() |
Coord |
LineAOE.getEnd() |
Coord[][] |
GreasedZOI.getInfluences()
Gets the influencing groups; ideally the result should not be changed without setting it back with setInfluences.
|
Coord[][] |
ZOI.getInfluences()
Gets the influencing groups; ideally the result should not be changed without setting it back with setInfluences.
|
Coord |
AOE.getOrigin()
Get the position from which the AOE originates, which may be related to the location of the AOE's effect, as for
lines, cones, and other emitted effects, or may be unrelated except for determining which enemies can be seen
or targeted from a given origin point (as for distant effects that radiate from a chosen central point, but
have a maxRange at which they can deliver that effect).
|
Coord |
BeamAOE.getOrigin() |
Coord |
BlastAOE.getOrigin() |
Coord |
BurstAOE.getOrigin() |
Coord |
CloudAOE.getOrigin() |
Coord |
ConeAOE.getOrigin() |
Coord |
LineAOE.getOrigin() |
Coord |
PointAOE.getOrigin() |
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() |
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(java.util.ArrayList<Coord> buffer,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findNearestMultiple(Coord start,
int limit,
java.util.Collection<Coord> targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first several targets found,
up to limit or less if the map is fully searched without finding enough.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets) |
java.util.ArrayList<Coord> |
DijkstraMap.findPathPreScanned(java.util.ArrayList<Coord> buffer,
Coord target)
When you can control how often the (relatively time-intensive) scan() method is called, but may need simple paths
very frequently (such as for a path that follows the mouse), you can use this method to reduce the amount of work
needed to find paths.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathPreScanned(Coord target)
When you can control how often the (relatively time-intensive) scan() method is called, but may need simple paths
very frequently (such as for a path that follows the mouse), you can use this method to reduce the amount of work
needed to find paths.
|
java.util.ArrayList<Coord> |
DijkstraMap.findShortcutPath(Coord start,
Coord... targets)
If you have a target or group of targets you want to pathfind to without scanning the full map, this can be good.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(java.util.ArrayList<Coord> buffer,
int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
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.
|
java.util.ArrayList<Coord> |
WaypointPathfinder.getKnownPath(Coord self,
Coord approximateTarget)
Finds the appropriate one of the already-calculated, possibly-long paths this class stores to get from a waypoint
to another waypoint, then quickly finds a path to get on the long path, and returns the total path.
|
OrderedSet<Coord> |
WaypointPathfinder.getWaypoints() |
java.util.ArrayList<Coord> |
WaypointPathfinder.goBackToPath(Coord currentPosition,
java.util.ArrayList<Coord> path)
If a creature is interrupted or obstructed on a "highway" path, it may need to travel off the path to its goal.
|
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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.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.
|
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 | 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.
|
boolean |
Technique.canTarget(Coord user,
Coord possibleTarget)
A quick yes-or-no check for whether a
user at a given Coord can use this Technique to target the given
Coord of a possibleTarget . |
int |
DijkstraMap.encode(Coord point)
Internally, DijkstraMap uses int primitives instead of Coord objects, but the specific encoding depends on
this DijkstraMap's width and height.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(java.util.ArrayList<Coord> buffer,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(java.util.ArrayList<Coord> buffer,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
Coord |
DijkstraMap.findNearest(Coord start,
java.util.Collection<Coord> targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first target found.
|
Coord |
DijkstraMap.findNearest(Coord start,
Coord... targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first target found.
|
Coord |
DijkstraMap.findNearest(Coord start,
Coord... targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first target found.
|
java.util.ArrayList<Coord> |
DijkstraMap.findNearestMultiple(Coord start,
int limit,
java.util.Collection<Coord> targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first several targets found,
up to limit or less if the map is fully searched without finding enough.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets) |
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets) |
java.util.ArrayList<Coord> |
DijkstraMap.findPathPreScanned(java.util.ArrayList<Coord> buffer,
Coord target)
When you can control how often the (relatively time-intensive) scan() method is called, but may need simple paths
very frequently (such as for a path that follows the mouse), you can use this method to reduce the amount of work
needed to find paths.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathPreScanned(Coord target)
When you can control how often the (relatively time-intensive) scan() method is called, but may need simple paths
very frequently (such as for a path that follows the mouse), you can use this method to reduce the amount of work
needed to find paths.
|
java.util.ArrayList<Coord> |
DijkstraMap.findShortcutPath(Coord start,
Coord... targets)
If you have a target or group of targets you want to pathfind to without scanning the full map, this can be good.
|
java.util.ArrayList<Coord> |
DijkstraMap.findShortcutPath(Coord start,
Coord... targets)
If you have a target or group of targets you want to pathfind to without scanning the full map, this can be good.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(java.util.ArrayList<Coord> buffer,
int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
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.
|
java.util.ArrayList<Coord> |
WaypointPathfinder.getKnownPath(Coord self,
Coord approximateTarget)
Finds the appropriate one of the already-calculated, possibly-long paths this class stores to get from a waypoint
to another waypoint, then quickly finds a path to get on the long path, and returns the total path.
|
java.util.ArrayList<Coord> |
WaypointPathfinder.goBackToPath(Coord currentPosition,
java.util.ArrayList<Coord> path)
If a creature is interrupted or obstructed on a "highway" path, it may need to travel off the path to its goal.
|
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.
|
protected GreasedRegion |
GreasedZOI.increasing(double[][] dm,
Coord[] inf) |
protected boolean[][] |
ZOI.increasing(double[][] dm,
Coord[] inf) |
IntVLA |
GreasedZOI.nearestInfluences(Coord point)
This can be given a Coord to check in the results of the latest calculate() call.
|
int[] |
ZOI.nearestInfluences(Coord point)
This can be given a Coord to check in the results of the latest calculate() call.
|
IntVLA |
GreasedZOI.nearestInfluences(GreasedRegion[] zones,
Coord point)
Given the zones resulting from this class'
GreasedZOI.calculate() method and a Coord to check, finds the indices of
all influencing groups in zones that have the Coord in their area, and returns all such indices as an IntVLA. |
int[] |
ZOI.nearestInfluences(short[][] zones,
Coord point)
Given the zones resulting from this class' calculate method and a Coord to check, finds the indices of all
influencing groups in zones that have the Coord in their area, and returns all such indices as an int array.
|
void |
DijkstraMap.partialScan(Coord start,
int limit,
java.util.Collection<Coord> impassable)
Recalculate the Dijkstra map up to a limit and return it.
|
void |
DijkstraMap.partialScan(Coord start,
int limit,
java.util.Collection<Coord> impassable,
boolean nonZeroOptimum)
Recalculate the Dijkstra map up to a limit and return it.
|
void |
DijkstraMap.partialScan(int limit,
Coord start,
java.util.Collection<Coord> impassable,
int size)
Recalculate the Dijkstra map for a creature that is potentially larger than 1x1 cell and return it.
|
GreasedRegion |
Technique.possibleTargets(Coord user)
Gets all possible target-able Coords when using this technique from the given Coord
user , returning them
in a GreasedRegion. |
GreasedRegion |
Technique.possibleTargets(Coord user,
double[][] resistanceMap)
Gets all possible target-able Coords when using this technique from the given Coord
user , returning them
in a GreasedRegion. |
void |
DijkstraMap.resetCell(Coord pt)
Reverts a cell to the value stored in the original state of the level as known by physicalMap.
|
void |
DijkstraMap.scan(Coord start,
java.util.Collection<Coord> impassable)
Recalculate the Dijkstra map and return it.
|
void |
DijkstraMap.scan(Coord start,
java.util.Collection<Coord> impassable,
boolean nonZeroOptimum)
Recalculate the Dijkstra map and return it.
|
void |
DijkstraMap.scan(Coord start,
java.util.Collection<Coord> impassable,
int size)
Recalculate the Dijkstra map for a creature that is potentially larger than 1x1 cell and return it.
|
void |
BlastAOE.setCenter(Coord center) |
void |
BurstAOE.setCenter(Coord center) |
void |
CloudAOE.setCenter(Coord center) |
void |
PointAOE.setCenter(Coord center) |
void |
DijkstraMap.setCost(Coord pt,
double cost)
Marks a cell's cost for pathfinding as cost, unless the cell is a wall or unreachable area (then it always sets
the cost to the value of the WALL field).
|
void |
BeamAOE.setEnd(Coord end) |
void |
LineAOE.setEnd(Coord end) |
void |
ConeAOE.setEndCenter(Coord endCenter) |
void |
DijkstraMap.setGoal(Coord pt)
Marks a cell as a goal for pathfinding, unless the cell is a wall or unreachable area (then it does nothing).
|
void |
DijkstraMap.setGoals(Coord[] pts)
Marks many cells as goals for pathfinding, ignoring cells in walls or unreachable areas.
|
void |
GreasedZOI.setInfluences(Coord[][] influences)
Changes the influencing groups.
|
void |
ZOI.setInfluences(Coord[][] influences)
Changes the influencing groups.
|
void |
AOE.setOrigin(Coord origin)
Set the position from which the AOE originates, which may be related to the location of the AOE's effect, as for
lines, cones, and other emitted effects, or may be unrelated except for determining which enemies can be seen
or targeted from a given origin point (as for distant effects that radiate from a chosen central point, but
have a maxRange at which they can deliver that effect).
|
void |
BeamAOE.setOrigin(Coord origin) |
void |
BlastAOE.setOrigin(Coord origin) |
void |
BurstAOE.setOrigin(Coord origin) |
void |
CloudAOE.setOrigin(Coord origin) |
void |
ConeAOE.setOrigin(Coord origin) |
void |
LineAOE.setOrigin(Coord origin) |
void |
PointAOE.setOrigin(Coord origin) |
void |
AOE.shift(Coord aim)
After an AOE has been constructed, it may need to have the affected area shifted over to a different position
without changing any other properties of the AOE.
|
void |
BeamAOE.shift(Coord aim) |
void |
BlastAOE.shift(Coord aim) |
void |
BurstAOE.shift(Coord aim) |
void |
CloudAOE.shift(Coord aim) |
void |
ConeAOE.shift(Coord aim) |
void |
LineAOE.shift(Coord aim) |
void |
PointAOE.shift(Coord aim) |
static boolean |
AreaUtils.verifyLimit(AimLimit limit,
Coord origin,
Coord end)
Checks that the given end Coord can be targeted from the given origin Coord given the directional targeting
rules specified by limit.
|
static boolean |
AreaUtils.verifyReach(Reach reach,
Coord origin,
Coord end)
Checks that the given end Coord can be targeted from the given origin Coord given the complete targeting rules
specified by reach.
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(java.util.ArrayList<Coord> buffer,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(java.util.ArrayList<Coord> buffer,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(java.util.ArrayList<Coord> buffer,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until a cell is reached with
a distance from a goal that is at least equal to minPreferredRange and no more than maxPreferredRange,
which may go further from a goal if the minPreferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, until preferredRange is
reached, or further from a goal if the preferredRange has not been met at the current distance.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
int scanLimit,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed fearSources and start
point, and returns a list of Coord positions (using this DijkstraMap's metric) needed to get further from
the closest fearSources, meant for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
java.util.ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... fearSources)
Scans the dungeon using DijkstraMap.scan with the listed fearSources and start point, and returns a list
of Coord positions (using Manhattan distance) needed to get further from the closest fearSources, meant
for running away.
|
Coord |
DijkstraMap.findNearest(Coord start,
java.util.Collection<Coord> targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first target found.
|
java.util.ArrayList<Coord> |
DijkstraMap.findNearestMultiple(Coord start,
int limit,
java.util.Collection<Coord> targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first several targets found,
up to limit or less if the map is fully searched without finding enough.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(java.util.ArrayList<Coord> buffer,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPath(int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
Scans the dungeon using DijkstraMap.scan or DijkstraMap.partialScan with the listed goals and start
point, and returns a list of Coord positions (using the current measurement) needed to get closer
to the closest reachable goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets)
For pathfinding creatures larger than 1x1 cell; scans the dungeon using DijkstraMap.scan with the listed goals
and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to the closest reachable
goal.
|
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets) |
java.util.ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
int scanLimit,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> onlyPassable,
Coord start,
Coord... targets) |
java.util.ArrayList<Coord> |
DijkstraMap.findPathPreScanned(java.util.ArrayList<Coord> buffer,
Coord target)
When you can control how often the (relatively time-intensive) scan() method is called, but may need simple paths
very frequently (such as for a path that follows the mouse), you can use this method to reduce the amount of work
needed to find paths.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(java.util.ArrayList<Coord> buffer,
int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(java.util.ArrayList<Coord> buffer,
int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(java.util.ArrayList<Coord> buffer,
int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(java.util.ArrayList<Coord> buffer,
int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
java.util.ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
java.util.Collection<Coord> impassable,
java.util.Collection<Coord> allies,
Coord start,
java.util.Collection<Coord> targets)
Scans the dungeon using DijkstraMap.scan with the listed goals and start point, and returns a list
of Coord positions (using the current measurement) needed to get closer to a goal, where goals are
considered valid if they are at a valid range for the given Technique to hit at least one target
and ideal if that Technique can affect as many targets as possible from a cell that can be moved
to with at most movelength steps.
|
java.util.ArrayList<Coord> |
WaypointPathfinder.goBackToPath(Coord currentPosition,
java.util.ArrayList<Coord> path)
If a creature is interrupted or obstructed on a "highway" path, it may need to travel off the path to its goal.
|
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
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>> |
BeamAOE.idealLocations(java.util.Collection<Coord> priorityTargets,
java.util.Collection<Coord> lesserTargets,
java.util.Collection<Coord> 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>> |
BlastAOE.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>> |
BurstAOE.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>> |
CloudAOE.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>> |
ConeAOE.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>> |
LineAOE.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>> |
PointAOE.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.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.
|
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.
|
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.
|
boolean |
AOE.mayContainTarget(java.util.Collection<Coord> targets)
Given a Set of Points that the producer of the AOE wants to include in the region of this AOE, this method does
a quick approximation to see if there is any possibility that the AOE as currently configured might include one
of those Points within itself.
|
boolean |
BeamAOE.mayContainTarget(java.util.Collection<Coord> targets) |
boolean |
BlastAOE.mayContainTarget(java.util.Collection<Coord> targets) |
boolean |
BurstAOE.mayContainTarget(java.util.Collection<Coord> targets) |
boolean |
CloudAOE.mayContainTarget(java.util.Collection<Coord> targets) |
boolean |
ConeAOE.mayContainTarget(java.util.Collection<Coord> targets) |
boolean |
LineAOE.mayContainTarget(java.util.Collection<Coord> targets) |
boolean |
PointAOE.mayContainTarget(java.util.Collection<Coord> targets) |
void |
DijkstraMap.partialScan(Coord start,
int limit,
java.util.Collection<Coord> impassable)
Recalculate the Dijkstra map up to a limit and return it.
|
void |
DijkstraMap.partialScan(Coord start,
int limit,
java.util.Collection<Coord> impassable,
boolean nonZeroOptimum)
Recalculate the Dijkstra map up to a limit and return it.
|
double[][] |
DijkstraMap.partialScan(int limit,
java.util.Collection<Coord> impassable)
Recalculate the Dijkstra map up to a limit and return it.
|
double[][] |
DijkstraMap.partialScan(int limit,
java.util.Collection<Coord> impassable,
int size)
Recalculate the Dijkstra map for a creature that is potentially larger than 1x1 cell and return it.
|
void |
DijkstraMap.partialScan(int limit,
Coord start,
java.util.Collection<Coord> impassable,
int size)
Recalculate the Dijkstra map for a creature that is potentially larger than 1x1 cell and return it.
|
double[][] |
DijkstraMap.scan(java.util.Collection<Coord> impassable)
Recalculate the Dijkstra map and return it.
|
double[][] |
DijkstraMap.scan(java.util.Collection<Coord> impassable,
int size)
Recalculate the Dijkstra map for a creature that is potentially larger than 1x1 cell and return it.
|
void |
DijkstraMap.scan(Coord start,
java.util.Collection<Coord> impassable)
Recalculate the Dijkstra map and return it.
|
void |
DijkstraMap.scan(Coord start,
java.util.Collection<Coord> impassable,
boolean nonZeroOptimum)
Recalculate the Dijkstra map and return it.
|
void |
DijkstraMap.scan(Coord start,
java.util.Collection<Coord> impassable,
int size)
Recalculate the Dijkstra map for a creature that is potentially larger than 1x1 cell and return it.
|
void |
DijkstraMap.setGoals(java.lang.Iterable<Coord> pts)
Marks many cells as goals for pathfinding, ignoring cells in walls or unreachable areas.
|
Constructor and Description |
---|
BeamAOE(Coord origin,
Coord end) |
BeamAOE(Coord origin,
Coord end,
int radius) |
BeamAOE(Coord origin,
Coord end,
int radius,
Radius radiusType) |
BeamAOE(Coord origin,
double angle,
int length) |
BeamAOE(Coord origin,
double angle,
int length,
int radius) |
BeamAOE(Coord origin,
double angle,
int length,
int radius,
Radius radiusType) |
BlastAOE(Coord center,
int radius,
Radius radiusType) |
BlastAOE(Coord center,
int radius,
Radius radiusType,
int minRange,
int maxRange) |
BurstAOE(Coord center,
int radius,
Radius radiusType) |
BurstAOE(Coord center,
int radius,
Radius radiusType,
int minRange,
int maxRange) |
CloudAOE(Coord center,
int volume,
Radius radiusType) |
CloudAOE(Coord center,
int volume,
Radius radiusType,
int minRange,
int maxRange) |
CloudAOE(Coord center,
int volume,
Radius radiusType,
long rngSeed) |
CloudAOE(Coord center,
int volume,
Radius radiusType,
long rngSeed,
int minRange,
int maxRange) |
ConeAOE(Coord origin,
Coord endCenter,
double span,
Radius radiusType) |
ConeAOE(Coord origin,
int radius,
double angle,
double span,
Radius radiusType) |
GreasedZOI(Coord[][] influences,
char[][] map,
Radius radiusStrategy)
Constructs a Zone of Influence map.
|
GreasedZOI(Coord[] influences,
char[][] map,
Radius radiusStrategy)
Constructs a Zone of Influence map.
|
LineAOE(Coord origin,
Coord end) |
LineAOE(Coord origin,
Coord end,
int radius) |
LineAOE(Coord origin,
Coord end,
int radius,
Radius radiusType) |
LineAOE(Coord origin,
Coord end,
int radius,
Radius radiusType,
int minRange,
int maxRange) |
PointAOE(Coord center) |
PointAOE(Coord center,
int minRange,
int maxRange) |
Threat(Coord position,
int maxThreatDistance) |
Threat(Coord position,
int minThreatDistance,
int maxThreatDistance) |
Threat(Coord position,
int minThreatDistance,
int maxThreatDistance,
Radius measurement) |
Threat(Coord position,
int minThreatDistance,
int maxThreatDistance,
Radius measurement,
AimLimit limits) |
ZOI(Coord[][] influences,
char[][] map,
Radius radiusStrategy)
Constructs a Zone of Influence map.
|
ZOI(Coord[] influences,
char[][] map,
Radius radiusStrategy)
Constructs a Zone of Influence map.
|
Constructor and Description |
---|
GreasedZOI(java.util.Collection<Coord> influences,
char[][] map,
Radius radiusStrategy)
Constructs a Zone of Influence map.
|
Modifier and Type | Field and Description |
---|---|
static Heuristic<Coord> |
Heuristic.CHEBYSHEV
A predefined Heuristic for Coord nodes in a 2D plane where diagonal movement is estimated as costing the same as
orthogonal movement.
|
static Heuristic<Coord> |
Heuristic.DIJKSTRA
A predefined Heuristic for Coord nodes in a 2D plane where the heuristic is not used, and all cells are
considered equivalent regardless of actual distance.
|
static Heuristic<Coord> |
Heuristic.EUCLIDEAN
A predefined Heuristic for Coord nodes in a 2D plane where all movement is calculated "as-the-crow-flies," using
the standard Pythagorean formula for distance as in the real world.
|
static java.util.List<Heuristic<Coord>> |
Heuristic.HEURISTICS
An unmodifiable List of all the Heuristic implementations in this class.
|
static Heuristic<Coord> |
Heuristic.MANHATTAN
A predefined Heuristic for Coord nodes in a 2D plane where diagonal movement is estimated as costing twice as
much as orthogonal movement.
|
Modifier and Type | Method and Description |
---|---|
Graph<Coord> |
CostlyGraph.breadthFirstSearch(Coord coord)
Perform a breadth first search starting from the specified vertex.
|
Graph<Coord> |
DefaultGraph.breadthFirstSearch(Coord coord)
Perform a breadth first search starting from the specified vertex.
|
Graph<Coord> |
CostlyGraph.breadthFirstSearch(Coord coord,
int maxVertices,
int maxDepth)
Perform a breadth first search starting from the specified vertex.
|
Graph<Coord> |
DefaultGraph.breadthFirstSearch(Coord coord,
int maxVertices,
int maxDepth)
Perform a breadth first search starting from the specified vertex.
|
Graph<Coord> |
CostlyGraph.depthFirstSearch(Coord coord)
Perform a depth first search starting from the specified vertex.
|
Graph<Coord> |
DefaultGraph.depthFirstSearch(Coord coord)
Perform a depth first search starting from the specified vertex.
|
Graph<Coord> |
CostlyGraph.depthFirstSearch(Coord coord,
int maxVertices,
int maxDepth)
Perform a depth first search starting from the specified vertex.
|
Graph<Coord> |
DefaultGraph.depthFirstSearch(Coord coord,
int maxVertices,
int maxDepth)
Perform a depth first search starting from the specified vertex.
|
Graph<Coord> |
DefaultGraph.findMinimumWeightSpanningTree()
Find a minimum weight spanning tree using Kruskal's algorithm.
|
java.util.ArrayList<Coord> |
CostlyGraph.findShortestPath(Coord start,
Coord target)
Find the shortest path between the start and target vertices, using Dijkstra's algorithm implemented with a priority queue.
|
java.util.ArrayList<Coord> |
DefaultGraph.findShortestPath(Coord start,
Coord target)
Find the shortest path between the start and target vertices, using Dijkstra's algorithm implemented with a priority queue.
|
java.util.ArrayList<Coord> |
CostlyGraph.findShortestPath(Coord start,
Coord target,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided heuristic, and implemented with a priority queue.
|
java.util.ArrayList<Coord> |
DefaultGraph.findShortestPath(Coord start,
Coord target,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided heuristic, and implemented with a priority queue.
|
Modifier and Type | Method and Description |
---|---|
Graph<Coord> |
CostlyGraph.breadthFirstSearch(Coord coord)
Perform a breadth first search starting from the specified vertex.
|
Graph<Coord> |
DefaultGraph.breadthFirstSearch(Coord coord)
Perform a breadth first search starting from the specified vertex.
|
Graph<Coord> |
CostlyGraph.breadthFirstSearch(Coord coord,
int maxVertices,
int maxDepth)
Perform a breadth first search starting from the specified vertex.
|
Graph<Coord> |
DefaultGraph.breadthFirstSearch(Coord coord,
int maxVertices,
int maxDepth)
Perform a breadth first search starting from the specified vertex.
|
Graph<Coord> |
CostlyGraph.depthFirstSearch(Coord coord)
Perform a depth first search starting from the specified vertex.
|
Graph<Coord> |
DefaultGraph.depthFirstSearch(Coord coord)
Perform a depth first search starting from the specified vertex.
|
Graph<Coord> |
CostlyGraph.depthFirstSearch(Coord coord,
int maxVertices,
int maxDepth)
Perform a depth first search starting from the specified vertex.
|
Graph<Coord> |
DefaultGraph.depthFirstSearch(Coord coord,
int maxVertices,
int maxDepth)
Perform a depth first search starting from the specified vertex.
|
double |
CostlyGraph.findMinimumDistance(Coord start,
Coord target)
Find the shortest path between the start and target vertices, using Dijkstra's algorithm implemented with a priority queue.
|
double |
DefaultGraph.findMinimumDistance(Coord start,
Coord target)
Find the shortest path between the start and target vertices, using Dijkstra's algorithm implemented with a priority queue.
|
java.util.ArrayList<Coord> |
CostlyGraph.findShortestPath(Coord start,
Coord target)
Find the shortest path between the start and target vertices, using Dijkstra's algorithm implemented with a priority queue.
|
java.util.ArrayList<Coord> |
DefaultGraph.findShortestPath(Coord start,
Coord target)
Find the shortest path between the start and target vertices, using Dijkstra's algorithm implemented with a priority queue.
|
boolean |
CostlyGraph.findShortestPath(Coord start,
Coord target,
java.util.ArrayList<Coord> path,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided
heuristic, and implemented with a priority queue.
|
boolean |
DefaultGraph.findShortestPath(Coord start,
Coord target,
java.util.ArrayList<Coord> path,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided
heuristic, and implemented with a priority queue.
|
java.util.ArrayList<Coord> |
CostlyGraph.findShortestPath(Coord start,
Coord target,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided heuristic, and implemented with a priority queue.
|
java.util.ArrayList<Coord> |
DefaultGraph.findShortestPath(Coord start,
Coord target,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided heuristic, and implemented with a priority queue.
|
Modifier and Type | Method and Description |
---|---|
boolean |
CostlyGraph.findShortestPath(Coord start,
Coord target,
java.util.ArrayList<Coord> path,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided
heuristic, and implemented with a priority queue.
|
boolean |
CostlyGraph.findShortestPath(Coord start,
Coord target,
java.util.ArrayList<Coord> path,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided
heuristic, and implemented with a priority queue.
|
boolean |
DefaultGraph.findShortestPath(Coord start,
Coord target,
java.util.ArrayList<Coord> path,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided
heuristic, and implemented with a priority queue.
|
boolean |
DefaultGraph.findShortestPath(Coord start,
Coord target,
java.util.ArrayList<Coord> path,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided
heuristic, and implemented with a priority queue.
|
java.util.ArrayList<Coord> |
CostlyGraph.findShortestPath(Coord start,
Coord target,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided heuristic, and implemented with a priority queue.
|
java.util.ArrayList<Coord> |
DefaultGraph.findShortestPath(Coord start,
Coord target,
Heuristic<Coord> heuristic)
Find the shortest path between the start and target vertices, using the A* search algorithm with the provided heuristic, and implemented with a priority queue.
|
boolean |
CostlyGraph.topologicalSort(java.util.ArrayList<Coord> sortedVertices)
Perform a topological sort on the graph, and puts the sorted vertices in the supplied list.
|
Modifier and Type | Field and Description |
---|---|
Coord |
SpatialMap.SpatialTriple.position |
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<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).
|
java.util.ArrayList<java.util.ArrayList<Coord>> |
MultiSpill.spreadPattern
Each key here is an initial point for a spiller passed to start(), and each value corresponds to a list of points
that the spiller will randomly fill, starting with the key, in order of when they are reached.
|
java.util.ArrayList<Coord> |
Spill.spreadPattern
The list of points that the Spill will randomly fill, starting with what is passed to start(), in order of when
they are reached.
|
Modifier and Type | Method and Description |
---|---|
Coord |
Radius.extend(Coord center,
Coord middle,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
Coord |
Adjacency.extractCoord(int data) |
Coord |
SpatialMap.getPosition(I i)
Gets the position of the element with the given identity.
|
Coord |
Radius.onUnitShape(double distance,
IRNG rng) |
Coord |
SpatialMap.randomPosition(IRNG rng) |
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<Coord> |
SpatialMap.circlePositionIterator(int x,
int y,
int distance)
Iterates through positions in a circular region (starting at a minimum of x - distance, y - distance and
extending to x + distance, y + distance but skipping any positions where the Euclidean distance from x,y to the
position is more than distance) in left-to-right, then top-to-bottom order (the same as reading a page of text).
|
OrderedSet<Coord> |
Radius.expand(int distance,
int width,
int height,
java.lang.Iterable<Coord> points)
Given an Iterable of Coord (such as a List or Set), a distance to expand outward by (using this Radius), and the
bounding height and width of the map, gets a "thickened" group of Coord as a Set where each Coord in points has
been expanded out by an amount no greater than distance.
|
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.
|
java.util.ArrayDeque<Coord> |
LOS.getLastPath()
Returns the path of the last LOS calculation, with the starting point as
the head of the queue.
|
static java.util.List<Coord> |
Radius.inCircle(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height)
Gets a List of all Coord points within
radiusLength of center using Euclidean measurement (making
a circle). |
static java.util.List<Coord> |
Radius.inCircle(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height,
java.util.List<Coord> buf)
Gets a List of all Coord points within
radiusLength of center using Euclidean measurement (making
a circle). |
static java.util.List<Coord> |
Radius.inDiamond(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height)
Gets a List of all Coord points within
radiusLength of center using Manhattan measurement (making
a diamond). |
static java.util.List<Coord> |
Radius.inDiamond(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height,
java.util.List<Coord> buf)
Gets a List of all Coord points within
radiusLength of center using Manhattan measurement (making
a diamond). |
static java.util.List<Coord> |
Radius.inSquare(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height)
Gets a List of all Coord points within
radiusLength of center using Chebyshev measurement (making
a square). |
static java.util.List<Coord> |
Radius.inSquare(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height,
java.util.List<Coord> buf)
Gets a List of all Coord points within
radiusLength of center using Chebyshev measurement (making
a square). |
OrderedSet<Coord> |
Radius.perimeter(Coord center,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
java.util.List<Coord> |
Radius.pointsInside(Coord center,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
java.util.List<Coord> |
Radius.pointsInside(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
java.util.List<Coord> |
Radius.pointsInside(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height,
java.util.List<Coord> buf) |
java.util.Iterator<Coord> |
SpatialMap.positionIterator()
Iterates through positions in insertion order; has less predictable iteration order than the other iterators.
|
OrderedSet<Coord> |
SpatialMap.positions()
Get a Set of all positions used for values in this data structure, returning a OrderedSet (defensively copying
the key set used internally) for its stable iteration order.
|
java.util.Iterator<Coord> |
SpatialMap.radiusPositionIterator(int x,
int y,
Radius measurement,
int distance)
Iterates through positions in a region defined by a Radius (starting at a minimum of x - distance, y - distance
and extending to x + distance, y + distance but skipping any positions where the Radius considers a position
further from x, y than distance) in left-to-right, then top-to-bottom order (the same as reading a page of text).
|
java.util.Iterator<Coord> |
SpatialMap.rectanglePositionIterator(int x,
int y,
int width,
int height)
Iterates through positions in a rectangular region (starting at a minimum of x, y and extending to the specified
width and height) in left-to-right, then top-to-bottom order (the same as reading a page of text).
|
java.util.ArrayList<Coord> |
Spill.start(Coord entry,
int volume,
java.util.Collection<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
java.util.ArrayList<java.util.ArrayList<Coord>> |
MultiSpill.start(java.util.List<Coord> entries,
int volume,
java.util.Collection<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
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 | Method and Description |
---|---|
void |
SpatialMap.add(Coord coord,
I id,
E element)
Adds a new element with the given identity and Coord position.
|
Coord |
Radius.extend(Coord center,
Coord middle,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
E |
SpatialMap.get(Coord c)
Gets the element at the given Coord position.
|
I |
SpatialMap.getIdentity(Coord c)
Gets the identity of the element at the given Coord position.
|
java.util.ArrayList<E> |
SpatialMap.getManyPositions(Coord[] positions)
Given an array of Coord, gets all elements in this SpatialMap that share a position with one of the Coord objects
in positions and returns them as an ArrayList of elements.
|
E |
SpatialMap.move(Coord previous,
Coord target)
Move an element from one position to another; moves whatever is at the Coord position previous to the new Coord
position target.
|
E |
SpatialMap.move(I id,
Coord target)
Move an element, picked by its identity, to a new Coord position.
|
OrderedSet<Coord> |
Radius.perimeter(Coord center,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
java.util.List<Coord> |
Radius.pointsInside(Coord center,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
E |
SpatialMap.positionalModify(Coord pos,
E newValue)
Changes the element's value associated with pos.
|
void |
SpatialMap.put(Coord coord,
I id,
E element)
Inserts a new element with the given identity and Coord position, potentially overwriting an existing element.
|
double |
Radius.radius(Coord end) |
double |
Radius.radius(Coord start,
Coord end) |
E |
SpatialMap.remove(Coord coord)
Removes the element at the given position from all storage in this data structure.
|
void |
SoundMap.removeSound(Coord pt)
If a sound is being produced at a given location (a Coord), this removes it.
|
void |
MultiSpill.resetCell(Coord pt)
Reverts a cell to an unfilled state (false in spillMap).
|
void |
SoundMap.resetCell(Coord pt)
Reverts a cell to the value stored in the original state of the level as known by physicalMap.
|
void |
Spill.resetCell(Coord pt)
Reverts a cell to an unfilled state (false in spillMap).
|
protected void |
Spill.setFresh(Coord pt)
Used internally to mark a cell as just-now being expanded from.
|
protected void |
SoundMap.setFresh(Coord pt,
double counter) |
protected void |
MultiSpill.setFresh(int idx,
Coord pt) |
void |
SoundMap.setSound(Coord pt,
double loudness)
Marks a cell as producing a sound with the given loudness; this can be placed on a wall or unreachable area,
but that may cause the sound to be un-hear-able.
|
java.util.ArrayList<Coord> |
Spill.start(Coord entry,
int volume,
java.util.Collection<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
static Direction |
Direction.toGoTo(Coord from,
Coord to) |
Modifier and Type | Method and Description |
---|---|
OrderedSet<Coord> |
Radius.expand(int distance,
int width,
int height,
java.lang.Iterable<Coord> points)
Given an Iterable of Coord (such as a List or Set), a distance to expand outward by (using this Radius), and the
bounding height and width of the map, gets a "thickened" group of Coord as a Set where each Coord in points has
been expanded out by an amount no greater than distance.
|
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.
|
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.
|
java.util.ArrayList<E> |
SpatialMap.getManyPositions(java.lang.Iterable<Coord> positions)
Given an Iterable (such as a List, Set, or other Collection) of Coord, gets all elements in this SpatialMap that
share a position with one of the Coord objects in positions and returns them as an ArrayList of elements.
|
static java.util.List<Coord> |
Radius.inCircle(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height,
java.util.List<Coord> buf)
Gets a List of all Coord points within
radiusLength of center using Euclidean measurement (making
a circle). |
static java.util.List<Coord> |
Radius.inDiamond(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height,
java.util.List<Coord> buf)
Gets a List of all Coord points within
radiusLength of center using Manhattan measurement (making
a diamond). |
static java.util.List<Coord> |
Radius.inSquare(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height,
java.util.List<Coord> buf)
Gets a List of all Coord points within
radiusLength of center using Chebyshev measurement (making
a square). |
static boolean[][] |
MimicFill.markSample(boolean[][] sample,
java.lang.Iterable<Coord> points)
Given a 2D boolean array sample (usually a final product of this class' fill() method) and an Iterable of Coord
(such as a List or Set of Coord, but a Region can also work), copies sample, then marks every Coord in points as
true if it is in-bounds, and returns the modified copy of sample.
|
java.util.List<Coord> |
Radius.pointsInside(int centerX,
int centerY,
int radiusLength,
boolean surpassEdges,
int width,
int height,
java.util.List<Coord> buf) |
java.util.ArrayList<Coord> |
Spill.start(Coord entry,
int volume,
java.util.Collection<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
java.util.ArrayList<java.util.ArrayList<Coord>> |
MultiSpill.start(java.util.List<Coord> entries,
int volume,
java.util.Collection<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
java.util.ArrayList<java.util.ArrayList<Coord>> |
MultiSpill.start(java.util.List<Coord> entries,
int volume,
java.util.Collection<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
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.
|
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.
|
Constructor and Description |
---|
SpatialMap(Coord[] coords,
I[] ids,
E[] elements)
Constructs a SpatialMap given arrays of Coord, identity, and element; all 3 arrays should have the same length,
since this will use only up to the minimum length of these arrays for how many it adds.
|
SpatialTriple(Coord position,
I id,
E element) |
Constructor and Description |
---|
SpatialMap(java.util.Collection<Coord> coords,
java.util.Collection<I> ids,
java.util.Collection<E> elements)
Constructs a SpatialMap given collections of Coord, identity, and element; all 3 collections should have the same
length, since this will use only up to the minimum length of these collections for how many it adds.
|
Modifier and Type | Field and Description |
---|---|
protected Coord |
SquidIterators.VerticalUp.prev |
protected Coord |
SquidIterators.BottomLeftToTopRight.previous
The point whose character was returned by the previous call to
SquidIterators.BottomLeftToTopRight.next() , or null if none. |
protected Coord |
SquidIterators.CenteredSquare.previous |
protected Coord |
SquidIterators.RectangleFromBottomLeftToTopRight.previous
The last cell returned
|
Modifier and Type | Method and Description |
---|---|
Coord |
SquidIterators.BottomLeftToTopRight.above() |
protected Coord |
SquidIterators.VerticalUp.findNext() |
protected Coord |
SquidIterators.CenteredSquare.findNext(boolean mute) |
protected Coord |
SquidIterators.AroundCounterClockWise.findNext(boolean mute) |
protected Coord |
SquidIterators.CenteredSquare.findNext0() |
Coord |
SquidIterators.BottomLeftToTopRight.next() |
Coord |
SquidIterators.CenteredSquare.next() |
Coord |
SquidIterators.RectangleFromBottomLeftToTopRight.next() |
Coord |
SquidIterators.AroundCounterClockWise.next() |
Coord |
SquidIterators.VerticalUp.next() |
Coord |
SquidIterators.Linear.next() |
protected Coord |
SquidIterators.RectangleFromBottomLeftToTopRight.next0() |
Constructor and Description |
---|
AroundCounterClockWise(int width,
int height,
Coord start)
A fresh iterator, to iterate counter clock wise around
start
starting on start 's right. |
CenteredSquare(int width,
int height,
Coord start,
int size)
An iterator to iterate in the square of size
size around
start . |
RectangleFromBottomLeftToTopRight(Coord start,
int width,
int height) |
VerticalUp(Coord start,
int width,
int height)
An iterator to iterate vertically, starting AFTER
start . |
Modifier and Type | Field and Description |
---|---|
protected Coord |
Rectangle.Impl.bottomLeft |
Coord[] |
RoomFinder.connections
When a RoomFinder is constructed, it stores all points of rooms that are adjacent to another region here.
|
Coord[] |
RoomFinder.doorways
When a RoomFinder is constructed, it stores all points of rooms that are adjacent to another region here.
|
Coord |
MapModule.max
The maximum point on the bounding rectangle of the room, including walls.
|
Coord |
MapModule.min
The minimum point on the bounding rectangle of the room, including walls.
|
Coord[] |
SpillWorldMap.mountains |
Coord[] |
RoomFinder.mouths
When a RoomFinder is constructed, it stores all points of rooms that are adjacent to another region here.
|
Coord |
DungeonGenerator.stairsDown |
Coord |
SectionDungeonGenerator.stairsDown |
Coord |
DungeonGenerator.stairsUp |
Coord |
SectionDungeonGenerator.stairsUp |
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<Coord> |
MapModule.bottomDoors |
OrderedMap<Coord,MapModule> |
ModularMapGenerator.displacement |
java.util.ArrayList<Coord> |
MapModule.leftDoors |
java.util.ArrayList<Coord> |
MapModule.rightDoors |
java.util.ArrayList<Coord> |
MapModule.topDoors |
Modifier and Type | Method and Description |
---|---|
static Coord |
Rectangle.Utils.center(Rectangle r) |
Coord |
MetsaMapFactory.closestCity(Coord point)
Finds and returns the closest point containing a city to the given point.
|
static Coord[] |
Rectangle.Utils.getAll4Corners(Rectangle r,
Coord[] buf) |
Coord |
Rectangle.getBottomLeft() |
Coord |
Rectangle.Impl.getBottomLeft() |
Coord |
Rectangle.Impl.getCenter() |
static Coord |
Rectangle.Utils.getCorner(Rectangle r,
Direction dir) |
static Coord |
DungeonUtility.getRandomCell(IRNG rng,
char[][] map,
java.util.Set<java.lang.Character> acceptable,
int frustration) |
Coord |
WorldMapGenerator.project(double latitude,
double longitude)
Given a latitude and longitude in radians (the conventional way of describing points on a globe), this gets the
(x,y) Coord on the map projection this generator uses that corresponds to the given lat-lon coordinates.
|
Coord |
WorldMapGenerator.SphereMap.project(double latitude,
double longitude)
Given a latitude and longitude in radians (the conventional way of describing points on a globe), this gets the
(x,y) Coord on the map projection this generator uses that corresponds to the given lat-lon coordinates.
|
Coord |
WorldMapGenerator.HyperellipticalMap.project(double latitude,
double longitude)
Given a latitude and longitude in radians (the conventional way of describing points on a globe), this gets the
(x,y) Coord on the map projection this generator uses that corresponds to the given lat-lon coordinates.
|
Coord |
DungeonUtility.randomCell(short[] packed)
Finds a random Coord where the x and y match up to a [x][y] location that is encoded as "on" in packed.
|
Coord |
DungeonUtility.randomFloor(char[][] map)
Finds a random Coord where the x and y match up to a [x][y] location on map that has '.' as a value.
|
Coord |
DungeonUtility.randomFloorLarge(char[][] map,
int size)
Finds a random Coord where the x and y match up to a [x][y] location on map that has '.' as a value,
and a square of cells extending in the positive x and y directions with a side length of size must also have
'.' as their values.
|
Coord |
DungeonUtility.randomMatchingTile(char[][] map,
char tile)
Finds a random Coord where the x and y match up to a [x][y] location on map that has the same value as the
parameter tile.
|
Coord |
DungeonUtility.randomStep(char[][] map,
Coord start,
boolean eightWay)
Gets a random Coord that is adjacent to start, validating whether the position can exist on the given map.
|
Modifier and Type | Method and Description |
---|---|
static java.util.ArrayList<Coord> |
DungeonUtility.allMatching(char[][] map,
char... matching) |
static OrderedSet<Coord> |
MixedGenerator.basicPoints(int width,
int height,
IRNG rng)
Mainly for internal use; this is used by
MixedGenerator(int, int, IRNG) to get its room positions. |
static java.util.Iterator<Coord> |
Rectangle.Utils.cells(Rectangle r)
Use
Rectangle.Utils.cellsList(Rectangle) if you want them all. |
static java.util.List<Coord> |
Rectangle.Utils.cellsList(Rectangle r)
Use
Rectangle.Utils.cells(Rectangle) if you may stop before the end of the
list, you'll save some memory. |
static java.util.List<Coord> |
DungeonUtility.circle(int x,
int y,
int radius,
java.util.List<Coord> buf)
Gets a List of Coord that are within radius distance of (x,y), and appends them to buf if it is non-null or makes
a fresh List to append to otherwise.
|
static java.util.List<Coord> |
MixedGenerator.cleanPoints(int width,
int height,
IRNG rng)
Mainly for internal use; this was used by
MixedGenerator(int, int, IRNG) to get its room positions, and
you can choose to use it with new MixedGenerator(width, height, rng, cleanPoints(width, height, rng)) . |
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.crossConnect(int width,
int height,
java.util.Map<Coord,java.util.List<Coord>> connections) |
static java.util.ArrayList<Coord> |
DungeonUtility.ensurePath(char[][] map,
IRNG rng,
char replacement,
char... blocking)
Ensures a path exists in a rough ring around the map by first creating the path (using
DungeonUtility.pointPath(int, int, IRNG) with the given IRNG), then finding chars in blocking that are on that path and
replacing them with replacement. |
java.util.List<Coord> |
Rectangle.Impl.getAll() |
OrderedSet<OrderedSet<Coord>> |
Placement.getAlongStraightWalls()
Gets an OrderedSet of OrderedSet of Coord, where each inner OrderedSet of Coord refers to a placement
region along a straight wall with length 3 or more, not including corners.
|
static java.util.List<Coord> |
Rectangle.Utils.getBorder(Rectangle r,
Direction cardinal,
java.util.List<Coord> buf) |
OrderedSet<OrderedSet<Coord>> |
Placement.getCenters()
Gets an OrderedSet of OrderedSet of Coord, where each inner OrderedSet of Coord refers to a room's cells
that are furthest from the walls, and each Coord is one of those central positions.
|
java.util.List<Coord> |
MetsaMapFactory.getCities() |
OrderedSet<OrderedSet<Coord>> |
Placement.getCorners()
Gets an OrderedSet of OrderedSet of Coord, where each inner OrderedSet of Coord refers to a room's
corners, and each Coord is one of those corners.
|
java.util.Collection<Coord> |
Rectangle.Impl.getExternalBorder() |
OrderedSet<Coord> |
Placement.getHidingPlaces(Radius radiusStrategy,
int range)
Gets an OrderedSet of Coord, where each Coord is hidden (using the given radiusStrategy and range for FOV
calculations) from any doorways or similar narrow choke-points where a character might be easily ambushed.
|
java.util.List<Coord> |
Rectangle.Impl.getInternalBorder() |
java.util.Iterator<Coord> |
Rectangle.Impl.iterator() |
protected static OrderedMap<Coord,java.util.List<Coord>> |
SymmetryDungeonGenerator.listToMap(java.util.List<Coord> sequence) |
protected static OrderedMap<Coord,java.util.List<Coord>> |
SymmetryDungeonGenerator.listToMap(java.util.List<Coord> sequence) |
static java.util.ArrayList<Coord> |
DungeonUtility.pointPath(int width,
int height,
IRNG rng) |
protected OrderedSet<Coord> |
DungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt) |
protected OrderedSet<Coord> |
SectionDungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt) |
protected OrderedSet<Coord> |
DungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected OrderedSet<Coord> |
SectionDungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected OrderedSet<Coord> |
SectionDungeonGenerator.removeNearby(OrderedSet<Coord> coll,
char[][] disallowed) |
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.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) |
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) |
protected static OrderedMap<Coord,java.util.List<Coord>> |
SymmetryDungeonGenerator.setToMap(OrderedSet<Coord> sequence) |
protected OrderedSet<Coord> |
DungeonGenerator.viableDoorways(boolean doubleDoors,
char[][] map) |
protected OrderedSet<Coord> |
SectionDungeonGenerator.viableDoorways(boolean doubleDoors,
char[][] map,
char[][] allCaves,
char[][] allCorridors) |
Modifier and Type | Method and Description |
---|---|
Coord |
MetsaMapFactory.closestCity(Coord point)
Finds and returns the closest point containing a city to the given point.
|
boolean |
Rectangle.Impl.contains(Coord c) |
boolean |
SectionMap.contains(Coord position)
Checks if this contains the given position (that is, it is within map bounds).
|
static boolean |
Rectangle.Utils.contains(java.lang.Iterable<? extends Rectangle> rs,
Coord c) |
static boolean |
Rectangle.Utils.contains(Rectangle r,
Coord c) |
static Coord[] |
Rectangle.Utils.getAll4Corners(Rectangle r,
Coord[] buf) |
static boolean |
DungeonUtility.inLevel(char[][] level,
Coord c) |
static boolean |
DungeonUtility.inLevel(double[][] level,
Coord c) |
static <T> boolean |
DungeonUtility.inLevel(T[][] level,
Coord c) |
protected boolean |
RectangleRoomFinder.isInDungeon(Coord c) |
protected boolean |
MixedGenerator.mark(Coord pos)
Internal use.
|
protected void |
MixedGenerator.markPiercing(Coord pos)
Internal use.
|
protected void |
MixedGenerator.markPiercingCave(Coord pos)
Internal use.
|
IntVLA |
SectionMap.positionToConnections(Coord position)
Gets the list of connected sections (by their identifying numbers) given a position inside that section.
|
GreasedRegion |
SectionMap.positionToContaining(Coord position)
Gets the GreasedRegion (a group of points as made by the constructor) that contains the given x, y point.
|
java.lang.String |
SectionMap.positionToName(Coord position)
Gets the name of the area that contains the given position.
|
int |
SectionMap.positionToNumber(Coord position)
Gets the identifying number of the area that contains the given position.
|
Coord |
DungeonUtility.randomStep(char[][] map,
Coord start,
boolean eightWay)
Gets a random Coord that is adjacent to start, validating whether the position can exist on the given map.
|
protected OrderedSet<Coord> |
DungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt) |
protected OrderedSet<Coord> |
SectionDungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt) |
protected OrderedSet<Coord> |
DungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected OrderedSet<Coord> |
SectionDungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt1,
Coord pt2) |
Modifier and Type | Method and Description |
---|---|
static java.util.List<Coord> |
DungeonUtility.circle(int x,
int y,
int radius,
java.util.List<Coord> buf)
Gets a List of Coord that are within radius distance of (x,y), and appends them to buf if it is non-null or makes
a fresh List to append to otherwise.
|
static boolean |
Rectangle.Utils.containsAny(Rectangle r,
java.util.Collection<Coord> cs) |
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.crossConnect(int width,
int height,
java.util.Map<Coord,java.util.List<Coord>> connections) |
static java.util.List<Coord> |
Rectangle.Utils.getBorder(Rectangle r,
Direction cardinal,
java.util.List<Coord> buf) |
protected static OrderedMap<Coord,java.util.List<Coord>> |
SymmetryDungeonGenerator.listToMap(java.util.List<Coord> sequence) |
protected OrderedSet<Coord> |
DungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt) |
protected OrderedSet<Coord> |
SectionDungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt) |
protected OrderedSet<Coord> |
DungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected OrderedSet<Coord> |
SectionDungeonGenerator.removeAdjacent(OrderedSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected OrderedSet<Coord> |
SectionDungeonGenerator.removeNearby(OrderedSet<Coord> coll,
char[][] disallowed) |
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) |
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) |
Constructor and Description |
---|
Impl(Coord bottomLeft,
int width,
int height) |
MapModule(char[][] map,
GreasedRegion validDoors,
Coord min,
Coord max)
Constructs a MapModule from the given arguments without modifying them, copying map without changing its size,
copying validDoors, and using the same min and max (which are immutable, so they can be reused).
|
Constructor and Description |
---|
MixedGenerator(int width,
int height,
IRNG rng,
java.util.List<Coord> sequence)
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,
IRNG rng,
java.util.Map<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 IRNG.
|
MixedGenerator(int width,
int height,
IRNG rng,
java.util.Map<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 IRNG.
|
MixedGenerator(int width,
int height,
IRNG rng,
java.util.Map<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 IRNG.
|
MixedGenerator(int width,
int height,
IRNG rng,
java.util.Map<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 IRNG.
|
SymmetryDungeonGenerator(int width,
int height,
IRNG rng,
java.util.List<Coord> sequence)
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)
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)
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.
|
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.
|
SymmetryDungeonGenerator(int width,
int height,
IRNG rng,
OrderedSet<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 |
---|---|
protected java.util.List<Coord> |
ListZone.coords |
protected java.util.List<Coord> |
CoordPackerZone.unpacked |
Modifier and Type | Method and Description |
---|---|
Coord |
Zone.getCenter() |
Coord |
Zone.Skeleton.getCenter() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<Coord> |
Zone.Helper.border(java.util.List<Coord> zone,
java.util.List<Coord> buffer)
An easy way to get the Coord items in a List of Coord that are at the edge of the region, using 8-way
adjacency (a corner is adjacent to both orthogonal and diagonal neighbors).
|
java.util.List<Coord> |
CoordPackerZone.getAll() |
java.util.List<Coord> |
ListZone.getAll() |
java.util.List<Coord> |
Zone.getAll() |
java.util.Collection<Coord> |
CoordPackerZone.getExternalBorder() |
java.util.Collection<Coord> |
Zone.getExternalBorder()
Gets a Collection of Coord values that are not in this Zone, but are
adjacent to it, either orthogonally or diagonally.
|
java.util.Collection<Coord> |
Zone.Skeleton.getExternalBorder() |
java.util.Collection<Coord> |
CoordPackerZone.getInternalBorder() |
java.util.Collection<Coord> |
Zone.getInternalBorder() |
java.util.Collection<Coord> |
Zone.Skeleton.getInternalBorder() |
java.util.List<Coord> |
ListZone.getState() |
java.util.Iterator<Coord> |
Zone.Skeleton.iterator() |
Modifier and Type | Method and Description |
---|---|
boolean |
CoordPackerZone.add(Coord coord)
Does nothing (this Zone is immutable).
|
boolean |
CoordPackerZone.contains(Coord c) |
boolean |
ListZone.contains(Coord c) |
boolean |
Zone.contains(Coord c) |
boolean |
Zone.Skeleton.contains(Coord c) |
Zone |
Zone.translate(Coord c) |
Zone |
Zone.Skeleton.translate(Coord c) |
Modifier and Type | Method and Description |
---|---|
boolean |
CoordPackerZone.addAll(java.util.Collection<? extends Coord> c)
Does nothing (this Zone is immutable).
|
static java.util.List<Coord> |
Zone.Helper.border(java.util.List<Coord> zone,
java.util.List<Coord> buffer)
An easy way to get the Coord items in a List of Coord that are at the edge of the region, using 8-way
adjacency (a corner is adjacent to both orthogonal and diagonal neighbors).
|
static java.util.List<Coord> |
Zone.Helper.border(java.util.List<Coord> zone,
java.util.List<Coord> buffer)
An easy way to get the Coord items in a List of Coord that are at the edge of the region, using 8-way
adjacency (a corner is adjacent to both orthogonal and diagonal neighbors).
|
Constructor and Description |
---|
ListZone(Coord[] coords) |
Constructor and Description |
---|
ListZone(java.util.Collection<Coord> coordCollection) |
ListZone(java.util.List<Coord> coords) |
Modifier and Type | Class and Description |
---|---|
class |
Coord3D
Generic three dimensional coordinate class.
|
Modifier and Type | Field and Description |
---|---|
protected Coord[] |
Region.coords |
protected Coord |
AStarSearch.start |
protected Coord |
AStarSearch.target |
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<Coord> |
TwistedLine.lastPath |
protected java.util.ArrayList<Coord> |
AStarSearch.path |
Modifier and Type | Method and Description |
---|---|
Coord |
Coord.add(Coord other)
Separately combines the x and y positions of this Coord and other, producing a different Coord as their "sum."
|
Coord |
Coord.add(double operand)
Separately adds the x and y positions of this Coord to operand, rounding to the nearest int for each of x
and y and producing a different Coord as their "sum."
|
Coord |
Coord.add(int operand)
Separately adds the x and y positions of this Coord to operand, producing a different Coord as their
"sum."
|
static Coord[] |
CoordPacker.allPacked(short[] packed)
Gets all positions that are "on" in the given packed array, without unpacking it, and returns them as a Coord[].
|
static Coord[] |
CoordPacker.apartPacked(short[] packed,
int minDistance)
Gets the positions that are "on" in the given packed array, without unpacking it, keeps only positions that are
at least minDistance apart from other positions this will return, and returns the positions as a Coord[].
|
static Coord[] |
CoordPacker.apartPacked(short[] packed,
int minDistance,
boolean eightWay)
Gets the positions that are "on" in the given packed array, without unpacking it, keeps only positions that are
at least minDistance apart from other positions this will return, and returns the positions as a Coord[].
|
Coord[] |
GreasedRegion.asCoords() |
Coord[] |
GreasedRegion.asCoords(Coord[] points) |
Coord |
GreasedRegion.atFraction(double fraction) |
Coord |
Coord.average(Coord other)
Separately averages the x and y positions of this Coord with other, producing a different Coord as their
"midpoint."
|
static Coord[] |
CoordPacker.bounds(short[] packed)
Finds the minimum bounding rectangle for a packed array without unpacking it.
|
Coord |
NeuralParticle.createPoint()
Creates a pip that falls within the required distance from the current
distribution.
|
static Coord |
Coord.decode(int code)
This can take an int produced by
someCoord.encode() and get the original Coord back out of it. |
Coord |
Coord.divide(Coord other)
Separately divides the x and y positions of this Coord by other, producing a different Coord as their
"quotient." If other has 0 for x or y, this will throw an exception, as dividing by 0 is expected to do.
|
Coord |
Coord.divide(double operand)
Separately divides the x and y positions of this Coord by operand, flooring to a lower int for each of x and
y and producing a different Coord as their "quotient." If operand is 0.0, expect strange results (infinity and
NaN are both possibilities).
|
Coord |
Coord.divide(int operand)
Separately divides the x and y positions of this Coord by operand, producing a different Coord as their
"quotient." If operand is 0, this will throw an exception, as dividing by 0 is expected to do.
|
Coord |
Coord.divideRounding(double operand)
Separately divides the x and y positions of this Coord by operand, rounding to the nearest int for each of x and
y and producing a different Coord as their "quotient." If operand is 0.0, expect strange results (infinity and
NaN are both possibilities).
|
Coord |
GreasedRegion.first()
Gets the first Coord in the iteration order, or (-1,-1) if this GreasedRegion is empty.
|
Coord |
GreasedRegion.fit(double xFraction,
double yFraction) |
static Coord[] |
CoordPacker.fractionPacked(short[] packed,
int fraction)
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 one of those cells as a Coord, and returns the accumulated
portion of positions as a Coord[].
|
Coord |
Region.get(int index)
Gets the Coord stored at the given index in this Region, or null if index is out of bounds.
|
static Coord |
Coord.get(int x,
int y) |
Coord[] |
Region.getCoords()
Gets the Coords contained in this as an array, a direct reference that does permit modifying the Coords in your
own code without altering "dirty/clean" status.
|
Coord |
Coord.getLocation()
Provided for compatibility with earlier code that used the AWT Point API.
|
Coord |
Region.getRandomCoord(IRNG rng)
Gets a single random Coord from this using the given RNG (which can be seeded); returns null if this is empty.
|
Coord[] |
RNG.getRandomUniqueCells(int startX,
int startY,
int width,
int height)
Gets an array of unique Coords, from (startX,startY) inclusive to (startX+width,startY+height) exclusive, in a
random order, with the array containing
width * height items. |
Coord[] |
RNG.getRandomUniqueCells(int startX,
int startY,
int width,
int height,
Coord[] dest)
Assigns to dest an array of unique Coords, from (startX,startY) inclusive to (startX+width,startY+height)
exclusive, in a random order, with dest after this is called containing the lesser of
width * height or
dest.length items. |
Coord[] |
RNG.getRandomUniqueCells(int startX,
int startY,
int width,
int height,
int size)
Gets an array of unique Coords, from (startX,startY) inclusive to (startX+width,startY+height) exclusive, in a
random order, with the array containing
Math.min(width * height, size) items. |
static Coord |
VanDerCorputQRNG.haltoid(int seed,
int width,
int height,
int xOffset,
int yOffset,
int index)
Samples a quasi-random Coord sequence that is almost unique to the given seed, getting a Coord with x between
xOffset (inclusive) and width + xOffset (exclusive), y between yOffset (inclusive) and height + yOffset
(exclusive).
|
static Coord |
VanDerCorputQRNG.halton(int width,
int height,
int index)
Convenience method that gets a quasi-random Coord between integer (0,0) inclusive and (width,height) exclusive
and gets the corresponding Coord from the Coord pool.
|
static Coord |
VanDerCorputQRNG.halton(int width,
int height,
int xOffset,
int yOffset,
int index)
Convenience method that gets a quasi-random Coord between integer (0,0) inclusive and (width,height) exclusive
and gets the corresponding Coord from the Coord pool.
|
static Coord |
CoordPacker.hilbertToCoord(int hilbert)
Takes a distance to travel along the 256x256 Hilbert curve and returns a Coord representing the position
in 2D space that corresponds to that point on the Hilbert curve.
|
Coord |
Coord.interpolate(Coord end,
float amountTraveled)
Gets a (usually cached) Coord between this Coord and
end , with the actual position relative to this based
on amountTraveled . |
Coord |
GreasedRegion.last()
Gets the last Coord in the iteration order, or (-1,-1) if this GreasedRegion is empty.
|
static Coord[] |
DDALine.line_(Coord start,
Coord end)
Draws a line from start to end using the DDA algorithm.
|
static Coord[] |
OrthoLine.line_(Coord start,
Coord end)
Draws a line from start to end using only N/S/E/W movement.
|
static Coord[] |
DDALine.line_(int startX,
int startY,
int endX,
int endY)
Draws a line from (startX, startY) to (endX, endY) using the DDA algorithm.
|
static Coord[] |
OrthoLine.line_(int startX,
int startY,
int endX,
int endY)
Draws a line from (startX, startY) to (endX, endY) using only N/S/E/W movement.
|
static Coord[] |
DDALine.line_(int startX,
int startY,
int endX,
int endY,
int modifierX,
int modifierY)
Not intended for external use; prefer the overloads without a modifier argument.
|
static Coord[] |
Bresenham.line2D_(Coord a,
Coord b)
Generates a 2D Bresenham line between two points.
|
static Coord[] |
Bresenham.line2D_(int startx,
int starty,
int endx,
int endy)
Generates a 2D Bresenham line between two points.
|
static Coord[] |
Bresenham.line2D_(int startx,
int starty,
int endx,
int endy,
int maxLength)
Generates a 2D Bresenham line between two points, stopping early if
the number of Coords returned reaches maxLength..
|
Coord |
Coord.makeEven()
Gets a Coord based off this instance but with odd values for x and/or y decreased to the nearest even number.
|
Coord |
Coord.makeOdd()
Gets a Coord based off this instance but with even values for x and/or y increased to the nearest odd number.
|
Coord[] |
GreasedRegion.mixedRandomSeparated(double fraction)
Gets a Coord array from the "on" contents of this GreasedRegion, using a deterministic but random-seeming
scattering of chosen cells with a count that matches the given
fraction of the total amount of "on" cells
in this. |
Coord[] |
GreasedRegion.mixedRandomSeparated(double fraction,
int limit)
Gets a Coord array from the "on" contents of this GreasedRegion, using a deterministic but random-seeming
scattering of chosen cells with a count that matches the given
fraction of the total amount of "on" cells
in this. |
Coord[] |
GreasedRegion.mixedRandomSeparated(double fraction,
int limit,
long seed)
Gets a Coord array from the "on" contents of this GreasedRegion, using a deterministic but random-seeming
scattering of chosen cells with a count that matches the given
fraction of the total amount of "on" cells
in this. |
Coord[] |
GreasedRegion.mixedRandomSeparatedAlt(double fraction,
int limit,
long seed)
Gets a Coord array from the "on" contents of this GreasedRegion, using a deterministic but random-seeming
scattering of chosen cells with a count that matches the given
fraction of the total amount of "on" cells
in this. |
static Coord |
CoordPacker.mooreToCoord(int moore)
Takes a distance to travel along the 16x16 Hilbert curve and returns a Coord representing the position
in 2D space that corresponds to that point on the Hilbert curve.
|
static Coord |
CoordPacker.mortonDecode(int morton)
Takes a Morton code, with interleaved x and y bits and x in the least significant bit, and returns the Coord
representing the same x, y position.
|
Coord |
Coord.multiply(Coord other)
Separately multiplies the x and y positions of other from this Coord, producing a different Coord as their
"product."
|
Coord |
Coord.multiply(double operand)
Separately multiplies the x and y positions of this Coord by operand, rounding to the nearest int for each of x
and y and producing a different Coord as their "product."
|
Coord |
Coord.multiply(int operand)
Separately multiplies the x and y positions of this Coord by operand, producing a different Coord as their
"product."
|
Coord |
GreasedRegion.GRIterator.next() |
Coord |
RNG.nextCoord(int width,
int height)
Gets a random Coord that has x between 0 (inclusive) and width (exclusive) and y between 0 (inclusive)
and height (exclusive).
|
Coord |
SobolQRNG.nextCoord(int xLimit,
int yLimit)
Generate a random vector as a Coord, scaled between 0 (inclusive) and the given limits (exclusive).
|
Coord |
GreasedRegion.nth(int index) |
static Coord |
CoordPacker.nth(short[] packed,
int n)
Gets the nth position that is "on" in the given packed array, without unpacking it, and returns it as a Coord.
|
Coord |
GreasedRegion.nthZCurve(int index)
Like
GreasedRegion.nth(int) , this gets the Coord at a given index along a path through the GreasedRegion, but unlike
nth(), this traverses the path in a zig-zag pattern called the Z-Order Curve. |
Coord[] |
GreasedRegion.quasiRandomSeparated(double fraction)
Gets a Coord array from the "on" contents of this GreasedRegion, using a quasi-random scattering of chosen cells
with a count that matches the given
fraction of the total amount of "on" cells in this. |
Coord[] |
GreasedRegion.quasiRandomSeparated(double fraction,
int limit)
Gets a Coord array from the "on" contents of this GreasedRegion, using a quasi-random scattering of chosen cells
with a count that matches the given
fraction of the total amount of "on" cells in this. |
Coord[] |
GreasedRegion.randomPortion(IRNG rng,
int size) |
static Coord[] |
CoordPacker.randomSample(short[] packed,
double fraction,
IRNG rng)
Gets a random subset of positions that are "on" in the given packed array, without unpacking it, and returns
them as a Coord[].
|
Coord[] |
GreasedRegion.randomSeparated(double fraction,
IRNG rng)
Don't use this in new code; prefer
GreasedRegion.mixedRandomSeparated(double, int, long) with a random long as the
last parameter. |
Coord[] |
GreasedRegion.randomSeparated(double fraction,
IRNG rng,
int limit)
Don't use this in new code; prefer
GreasedRegion.mixedRandomSeparated(double, int, long) with a random long as the
last parameter. |
static Coord[] |
CoordPacker.randomSeparated(short[] packed,
int separation,
IRNG 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,
IRNG rng,
java.util.HashSet<java.lang.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 Coord |
VanDerCorputQRNG.roberts(int width,
int height,
int xOffset,
int yOffset,
int index)
Martin Roberts' "unreasonably effective" quasi-random point sequence based on a 2D analogue to the golden ratio.
|
Coord |
Coord.scale(int i) |
Coord |
Coord.scale(int i,
int j) |
Coord[] |
GreasedRegion.separatedBlue(double fraction)
Gets a Coord array from the "on" contents of this GreasedRegion, using a quasi-random scattering of chosen cells
with a count that matches the given
fraction of the total amount of "on" cells in this. |
Coord[] |
GreasedRegion.separatedBlue(double fraction,
int limit)
Gets a Coord array from the "on" contents of this GreasedRegion, using a quasi-random scattering of chosen cells
with a count that matches the given
fraction of the total amount of "on" cells in this. |
Coord[] |
GreasedRegion.separatedPortion(double fraction)
Don't use this in new code; prefer
GreasedRegion.mixedRandomSeparated(double) , GreasedRegion.quasiRandomSeparated(double) ,
or GreasedRegion.separatedZCurve(double) . |
Coord[] |
GreasedRegion.separatedZCurve(double fraction)
Gets a Coord array from the "on" contents of this GreasedRegion, using a quasi-random scattering of chosen cells
with a count that matches the given
fraction of the total amount of "on" cells in this. |
Coord[] |
GreasedRegion.separatedZCurve(double fraction,
int limit)
Gets a Coord array from the "on" contents of this GreasedRegion, using a quasi-random scattering of chosen cells
with a count that matches the given
fraction of the total amount of "on" cells in this. |
Coord |
Coord.setX(int x) |
Coord |
Coord.setY(int y) |
Coord |
GreasedRegion.singleRandom(IRNG rng)
Gets a single random Coord from the "on" positions in this GreasedRegion, or the Coord (-1,-1) if this is empty.
|
static Coord |
CoordPacker.singleRandom(short[] packed,
IRNG 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.
|
Coord |
Coord.subtract(Coord other)
Separately subtracts the x and y positions of other from this Coord, producing a different Coord as their
"difference."
|
Coord |
Coord.subtract(double operand)
Separately subtracts operand from the x and y positions of this Coord, rounding to the nearest int for each of x
and y and producing a different Coord as their "difference."
|
Coord |
Coord.subtract(int operand)
Separately subtracts operand from the x and y positions of this Coord, producing a different Coord as their
"difference."
|
Coord |
Coord.translate(Direction d) |
Coord |
Coord.translate(int x,
int y)
Takes this Coord, adds x to its x and y to its y, and returns the Coord at that position.
|
Coord |
Coord.translateCapped(int x,
int y,
int width,
int height)
Takes this Coord, adds x to its x and y to its y, limiting x from 0 to width and limiting y from 0 to height,
and returns the Coord at that position.
|
static Coord |
CoordPacker.zDecode(short morton)
Takes a Morton code, with interleaved x and y bits and x in the least significant bit, and returns the Coord
representing the same x, y position.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Coord> |
NeuralParticle.asList()
Returns a list of the current distribution.
|
java.util.List<Coord> |
GreasedRegion.getAll() |
java.util.ArrayList<Coord> |
Elias.getLastPath() |
java.util.ArrayList<Coord> |
TwistedLine.getLastPath() |
java.lang.Iterable<Coord> |
RNG.getRandomCellsIterable(int width,
int height,
int size)
Use that to get random cells in a rectangular map.
|
java.util.Iterator<Coord> |
GreasedRegion.iterator() |
static java.util.List<Coord> |
DDALine.line(Coord start,
Coord end)
Draws a line from start to end using the DDA algorithm.
|
java.util.ArrayList<Coord> |
Elias.line(Coord start,
Coord end) |
static java.util.ArrayList<Coord> |
OrthoLine.line(Coord start,
Coord end)
Draws a line from start to end using only N/S/E/W movement.
|
java.util.ArrayList<Coord> |
TwistedLine.line(Coord start,
Coord end) |
java.util.ArrayList<Coord> |
Elias.line(Coord start,
Coord end,
double brightnessThreshold) |
static java.util.ArrayList<Coord> |
WobblyLine.line(Coord start,
Coord end,
int width,
int height)
Draws a line from start to end using the Drunkard's Walk algorithm.
|
java.util.ArrayList<Coord> |
Elias.line(double startx,
double starty,
double endx,
double endy)
Gets the line between the two points.
|
java.util.ArrayList<Coord> |
Elias.line(double startx,
double starty,
double endx,
double endy,
double brightnessThreshold)
Gets the line between the two points.
|
static java.util.List<Coord> |
DDALine.line(int startX,
int startY,
int endX,
int endY)
Draws a line from (startX, startY) to (endX, endY) using the DDA algorithm.
|
static java.util.ArrayList<Coord> |
OrthoLine.line(int startX,
int startY,
int endX,
int endY)
Draws a line from (startX, startY) to (endX, endY) using only N/S/E/W movement.
|
java.util.ArrayList<Coord> |
TwistedLine.line(int startX,
int startY,
int endX,
int endY) |
static java.util.List<Coord> |
DDALine.line(int startX,
int startY,
int endX,
int endY,
int modifierX,
int modifierY)
Not intended for external use; prefer the overloads without a modifier argument.
|
static java.util.ArrayList<Coord> |
WobblyLine.line(int startX,
int startY,
int endX,
int endY,
int width,
int height)
Draws a line from (startX, startY) to (endX, endY) using the Drunkard's Walk algorithm.
|
static java.util.ArrayList<Coord> |
WobblyLine.line(int startX,
int startY,
int endX,
int endY,
int width,
int height,
double weight,
IRNG rng)
Draws a line from (startX, startY) to (endX, endY) using the Drunkard's Walk algorithm.
|
static java.util.Queue<Coord> |
Bresenham.line2D(Coord a,
Coord b)
Generates a 2D Bresenham line between two points.
|
static java.util.Queue<Coord> |
Bresenham.line2D(int startx,
int starty,
int endx,
int endy)
Generates a 2D Bresenham line between two points.
|
static java.util.Queue<Coord> |
Bresenham.line2D(int startx,
int starty,
int endx,
int endy,
int maxLength)
Generates a 2D Bresenham line between two points, stopping early if
the number of Coords returned reaches maxLength.
|
java.util.ArrayList<Coord> |
AStarSearch.path(Coord start,
Coord target)
Finds an A* path to the target from the start.
|
java.util.ArrayList<Coord> |
AStarSearch.path(int startx,
int starty,
int targetx,
int targety)
Finds an A* path to the target from the start.
|
static java.util.ArrayList<Coord> |
CoordPacker.randomPortion(short[] packed,
int size,
IRNG 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 OrderedSet<Coord> |
PoissonDisk.sampleCircle(Coord center,
float radius,
float minimumDistance,
int maxX,
int maxY)
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 OrderedSet<Coord> |
PoissonDisk.sampleCircle(Coord center,
float radius,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
IRNG 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 OrderedSet<Coord> |
PoissonDisk.sampleMap(char[][] map,
float minimumDistance,
IRNG rng,
java.lang.Character... blocking) |
static OrderedSet<Coord> |
PoissonDisk.sampleMap(Coord minPosition,
Coord maxPosition,
char[][] map,
float minimumDistance,
IRNG rng,
java.lang.Character... blocking) |
static OrderedSet<Coord> |
PoissonDisk.sampleRectangle(Coord minPosition,
Coord maxPosition,
float minimumDistance,
int maxX,
int maxY)
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.
|
static OrderedSet<Coord> |
PoissonDisk.sampleRectangle(Coord minPosition,
Coord maxPosition,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
IRNG 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.
|
Modifier and Type | Method and Description |
---|---|
Coord |
Coord.add(Coord other)
Separately combines the x and y positions of this Coord and other, producing a different Coord as their "sum."
|
boolean |
GreasedRegion.add(Coord coord) |
void |
NeuralParticle.add(Coord point)
Adds a single specific point to the distribution.
|
boolean |
Region.add(Coord coord)
Adds a Coord to this Region, returning false if the Coord is null or already included in this, or true otherwise.
|
Coord[] |
GreasedRegion.asCoords(Coord[] points) |
Coord |
Coord.average(Coord other)
Separately averages the x and y positions of this Coord with other, producing a different Coord as their
"midpoint."
|
static short[] |
CoordPacker.circle(Coord center,
int radius,
int width,
int height)
Given a center and radius for a circle, plus the width and height for the map boundaries, returns the packed data
that encodes the circle.
|
boolean |
GreasedRegion.contains(Coord c)
Checks if
c is present in this GreasedRegion. |
static int |
CoordPacker.coordToHilbert(Coord pt)
Takes a position as a Coord called pt and returns the length to travel along the 256x256 Hilbert curve to reach
that position.
|
static int |
CoordPacker.coordToMoore(Coord pt)
Takes a position as a Coord called pt and returns the length to travel along the 16x16 Moore curve to reach
that position.
|
static double |
Coord.degrees(Coord from,
Coord to)
Gets the angle in degrees to go between two Coords.
|
static double[][] |
GreasedRegion.dijkstraScan(char[][] map,
Coord... goals)
Discouraged from active use; slower than
DijkstraMap and has less features. |
static double[][] |
GreasedRegion.dijkstraScan8way(char[][] map,
Coord... goals)
Discouraged from active use; slower than
DijkstraMap and has less features. |
double |
Coord.distance(Coord co) |
double |
Coord.distanceSq(Coord co) |
Coord |
Coord.divide(Coord other)
Separately divides the x and y positions of this Coord by other, producing a different Coord as their
"quotient." If other has 0 for x or y, this will throw an exception, as dividing by 0 is expected to do.
|
Coord[] |
RNG.getRandomUniqueCells(int startX,
int startY,
int width,
int height,
Coord[] dest)
Assigns to dest an array of unique Coords, from (startX,startY) inclusive to (startX+width,startY+height)
exclusive, in a random order, with dest after this is called containing the lesser of
width * height or
dest.length items. |
GreasedRegion |
GreasedRegion.insert(Coord point)
Sets the cell at point to "on".
|
GreasedRegion |
GreasedRegion.insertCircle(Coord center,
int radius) |
GreasedRegion |
GreasedRegion.insertSeveral(Coord... points) |
static short[] |
CoordPacker.insertSeveralPacked(short[] original,
Coord... points)
Given one packed short array, original, and a number of Coords, points, this produces a packed
short array that encodes "on" for any cell that was "on" in original, always encodes "on" for the position
referred to by any element of points, and encodes "off" for cells that were "off" in original and are not in any
cell points refers to.
|
Coord |
Coord.interpolate(Coord end,
float amountTraveled)
Gets a (usually cached) Coord between this Coord and
end , with the actual position relative to this based
on amountTraveled . |
boolean |
Coord.isAdjacent(Coord c) |
static Coord[] |
DDALine.line_(Coord start,
Coord end)
Draws a line from start to end using the DDA algorithm.
|
static Coord[] |
OrthoLine.line_(Coord start,
Coord end)
Draws a line from start to end using only N/S/E/W movement.
|
static java.util.List<Coord> |
DDALine.line(Coord start,
Coord end)
Draws a line from start to end using the DDA algorithm.
|
java.util.ArrayList<Coord> |
Elias.line(Coord start,
Coord end) |
static java.util.ArrayList<Coord> |
OrthoLine.line(Coord start,
Coord end)
Draws a line from start to end using only N/S/E/W movement.
|
java.util.ArrayList<Coord> |
TwistedLine.line(Coord start,
Coord end) |
java.util.ArrayList<Coord> |
Elias.line(Coord start,
Coord end,
double brightnessThreshold) |
static java.util.ArrayList<Coord> |
WobblyLine.line(Coord start,
Coord end,
int width,
int height)
Draws a line from start to end using the Drunkard's Walk algorithm.
|
static Coord[] |
Bresenham.line2D_(Coord a,
Coord b)
Generates a 2D Bresenham line between two points.
|
static java.util.Queue<Coord> |
Bresenham.line2D(Coord a,
Coord b)
Generates a 2D Bresenham line between two points.
|
static char[] |
OrthoLine.lineChars(Coord[] line)
Given an array of Coord as produced by
OrthoLine.line_(Coord, Coord) or OrthoLine.line_(int, int, int, int) , this
gets a char array of box-drawing characters that connect when drawn at the corresponding Coord positions in the
given line. |
Coord |
Coord.multiply(Coord other)
Separately multiplies the x and y positions of other from this Coord, producing a different Coord as their
"product."
|
static short[] |
CoordPacker.packOne(Coord point)
Returns a new packed short[] containing the Coord point as "on", and all other cells "off".
|
static short[] |
CoordPacker.packSeveral(Coord... points)
Returns a new packed short[] containing the Coords in points as "on" cells, and all other cells "off"
|
java.util.ArrayList<Coord> |
AStarSearch.path(Coord start,
Coord target)
Finds an A* path to the target from the start.
|
static Coord |
PoissonDisk.randomUnblockedTile(Coord minPosition,
Coord maxPosition,
char[][] map,
IRNG rng,
java.util.HashSet<java.lang.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 boolean |
OrthoLine.reachable(Coord start,
Coord target,
double[][] resistanceMap)
Checks whether the starting point can see the target point, using the
resistanceMap to determine whether
the line of sight is obstructed, without storing the line of points along the way. |
static boolean |
OrthoLine.reachable(Coord start,
Coord target,
double[][] resistanceMap,
java.util.ArrayList<Coord> buffer)
Checks whether the starting point can see the target point, using the
resistanceMap
to determine whether the line of sight is obstructed, and filling the list of cells along the line of sight into
buffer . |
GreasedRegion |
GreasedRegion.remove(Coord point) |
GreasedRegion |
GreasedRegion.removeCircle(Coord center,
int radius) |
GreasedRegion |
GreasedRegion.removeSeveral(Coord... points) |
static short[] |
CoordPacker.removeSeveralPacked(short[] original,
Coord... points)
Given one packed short array, original, and a number of Coords, points, this produces a packed short
array that encodes "on" for any cell that was "on" in original, unless it was a position referred to by an element
in points, and encodes "off" for cells that were "off" in original and are a cell points refers to.
|
static OrderedSet<Coord> |
PoissonDisk.sampleCircle(Coord center,
float radius,
float minimumDistance,
int maxX,
int maxY)
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 OrderedSet<Coord> |
PoissonDisk.sampleCircle(Coord center,
float radius,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
IRNG 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 OrderedSet<Coord> |
PoissonDisk.sampleMap(Coord minPosition,
Coord maxPosition,
char[][] map,
float minimumDistance,
IRNG rng,
java.lang.Character... blocking) |
static OrderedSet<Coord> |
PoissonDisk.sampleRectangle(Coord minPosition,
Coord maxPosition,
float minimumDistance,
int maxX,
int maxY)
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.
|
static OrderedSet<Coord> |
PoissonDisk.sampleRectangle(Coord minPosition,
Coord maxPosition,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
IRNG 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.
|
GreasedRegion |
GreasedRegion.set(boolean value,
Coord point)
Sets the cell at point to on if value is true or off if value is false.
|
void |
Region.setCoords(Coord... coords)
Changes this Region to include the given Coords and disregard its previous contents.
|
Coord |
Coord.subtract(Coord other)
Separately subtracts the x and y positions of other from this Coord, producing a different Coord as their
"difference."
|
Direction |
Coord.toGoTo(Coord target)
Gets the
Direction needed to get to target from this; typically this is more useful when target
and this are adjacent (by isAdjacent(Coord) ) since that should make it possible to go to target. |
GreasedRegion |
GreasedRegion.translate(Coord c)
Translates a copy of
this by the x,y values in c . |
Modifier and Type | Method and Description |
---|---|
boolean |
GreasedRegion.addAll(java.util.Collection<? extends Coord> c) |
GreasedRegion |
GreasedRegion.insertSeveral(java.lang.Iterable<Coord> points) |
static short[] |
CoordPacker.insertSeveralPacked(short[] original,
java.util.Collection<Coord> points)
Given one packed short array, original, and a Collection of Coords, points, this produces a packed
short array that encodes "on" for any cell that was "on" in original, always encodes "on" for the position
referred to by any element of points, and encodes "off" for cells that were "off" in original and are not in any
cell points refers to.
|
static char[] |
OrthoLine.lineChars(java.util.List<Coord> line)
Given a List of Coord as produced by
OrthoLine.line(Coord, Coord) or OrthoLine.line(int, int, int, int) , this
gets a char array of box-drawing characters that connect when drawn at the corresponding Coord positions in the
given line. |
static short[] |
CoordPacker.packSeveral(java.util.Collection<Coord> points)
Returns a new packed short[] containing the Coords in points as "on" cells, and all other cells "off"
|
static boolean |
OrthoLine.reachable(Coord start,
Coord target,
double[][] resistanceMap,
java.util.ArrayList<Coord> buffer)
Checks whether the starting point can see the target point, using the
resistanceMap
to determine whether the line of sight is obstructed, and filling the list of cells along the line of sight into
buffer . |
static boolean |
OrthoLine.reachable(int startX,
int startY,
int targetX,
int targetY,
double[][] resistanceMap,
java.util.ArrayList<Coord> buffer)
Checks whether the starting point can see the target point, using the
resistanceMap
to determine whether the line of sight is obstructed, and filling the list of cells along the line of sight into
buffer . |
static boolean |
OrthoLine.reachable(int startX,
int startY,
int targetX,
int targetY,
int maxLength,
double[][] resistanceMap,
java.util.ArrayList<Coord> buffer)
Checks whether the starting point can see the target point, using the
maxLength and resistanceMap
to determine whether the line of sight is obstructed, and filling the list of cells along the line of sight into
buffer . |
GreasedRegion |
GreasedRegion.removeSeveral(java.lang.Iterable<Coord> points) |
static short[] |
CoordPacker.removeSeveralPacked(short[] original,
java.util.Collection<Coord> points)
Given one packed short array, original, and a number of Coords, points, this produces a packed short
array that encodes "on" for any cell that was "on" in original, unless it was a position referred to by an element
in points, and encodes "off" for cells that were "off" in original and are a cell points refers to.
|
Constructor and Description |
---|
CoordDouble(Coord other) |
GreasedRegion(Coord single,
int width,
int height)
Constructor for a GreasedRegion that contains a single "on" cell, and has the given width and height.
|
GreasedRegion(int width,
int height,
Coord... points)
Constructor for a GreasedRegion that can have several "on" cells specified, and has the given width and height.
|
Region(Coord... points)
A constructor for a Region that takes an array or vararg of Coord and encodes all of them in the Region.
|
Region(Coord center,
int circleRadius,
int mapWidth,
int mapHeight)
A constructor for a circular Region (possibly truncated at the edges) with a Coord center, an int radius, and a
maximum width and height that the Coords in this Region will not exceed.
|
Constructor and Description |
---|
GreasedRegion(int width,
int height,
java.lang.Iterable<Coord> points)
Constructor for a GreasedRegion that can have several "on" cells specified, and has the given width and height.
|
Region(java.util.Collection<Coord> points)
A constructor for a Region that takes a Collection of Coord, such as a List or Set, and encodes all of them in
the Region.
|
Copyright © Eben Howard 2012–2022. All rights reserved.