Package | Description |
---|---|
squidpony |
Utilities that don't fit elsewhere in SquidLib, like text manipulation, some interfaces, and compatibility code.
|
squidpony.squidai |
Tools for finding paths, optimizing targets for area-of-effect (AOE) abilities, and evaluating influence on a grid.
|
squidpony.squidgrid |
Tools for working with data on a grid, including LOS and FOV; overlaps with geometry code in squidpony.squidmath .
|
squidpony.squidgrid.iterator |
Iterators that allow traversal of squidpony.squidmath.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.squidmath |
A very broad package containing random number generators, geometry tools, and some classes for combinatorics.
|
Modifier and Type | Method and Description |
---|---|
static Coord[] |
GwtCompatibility.cloneCoords(Coord[] input)
Gets an exact copy of an array of Coord.
|
Modifier and Type | Method and Description |
---|---|
static Coord[] |
GwtCompatibility.cloneCoords(Coord[] input)
Gets an exact copy of an array of Coord.
|
Modifier and Type | Field and Description |
---|---|
protected static Coord |
Technique.DEFAULT_POINT |
Coord |
Threat.position |
Coord[][] |
DijkstraMap.targetMap |
Modifier and Type | Field and Description |
---|---|
LinkedHashMap<Coord,Double> |
DijkstraMap.goals
Goals that pathfinding will seek out.
|
ArrayList<Coord> |
DijkstraMap.path
The latest path that was obtained by calling findPath().
|
Modifier and Type | Method and Description |
---|---|
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,
Set<Coord> targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first target found.
|
Coord |
PointAOE.getCenter() |
Coord |
CloudAOE.getCenter() |
Coord |
BurstAOE.getCenter() |
Coord |
BlastAOE.getCenter() |
Coord |
LineAOE.getEnd() |
Coord |
BeamAOE.getEnd() |
Coord[][] |
ZOI.getInfluences()
Gets the influencing groups; ideally the result should not be changed without setting it back with setInfluences.
|
Coord |
PointAOE.getOrigin() |
Coord |
LineAOE.getOrigin() |
Coord |
ConeAOE.getOrigin() |
Coord |
CloudAOE.getOrigin() |
Coord |
BurstAOE.getOrigin() |
Coord |
BlastAOE.getOrigin() |
Coord |
BeamAOE.getOrigin() |
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).
|
Modifier and Type | Method and Description |
---|---|
LinkedHashMap<Coord,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 LinkedHashMap<Coord,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 LinkedHashMap<Coord,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 LinkedHashMap<Coord,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 LinkedHashMap<Coord,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.
|
LinkedHashMap<Coord,Double> |
PointAOE.findArea() |
LinkedHashMap<Coord,Double> |
LineAOE.findArea() |
LinkedHashMap<Coord,Double> |
ConeAOE.findArea() |
LinkedHashMap<Coord,Double> |
CloudAOE.findArea() |
LinkedHashMap<Coord,Double> |
BurstAOE.findArea() |
LinkedHashMap<Coord,Double> |
BlastAOE.findArea() |
LinkedHashMap<Coord,Double> |
BeamAOE.findArea() |
LinkedHashMap<Coord,Double> |
AOE.findArea()
This is how an AOE interacts with anything that uses it.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findNearestMultiple(Coord start,
int limit,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPath(int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPathPreScanned(Coord target)
Intended primarily for internal use.
|
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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
FOVCache cache,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
LinkedHashMap<Coord,Double> |
DijkstraMap.floodFill(int radius,
Coord... starts)
A simple limited flood-fill that returns a LinkedHashMap of Coord keys to the Double values in the DijkstraMap, only
calculating out to a number of steps determined by limit.
|
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.
|
LinkedHashSet<Coord> |
WaypointPathfinder.getWaypoints() |
ArrayList<Coord> |
WaypointPathfinder.goBackToPath(Coord currentPosition,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> targets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> targets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
PointAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
PointAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
LineAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
LineAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
ConeAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
ConeAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
CloudAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
CloudAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BurstAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BurstAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BlastAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BlastAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BeamAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BeamAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
AOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions)
Returns a LinkedHashMap 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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
AOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions)
Returns a LinkedHashMap 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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
PointAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
PointAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
LineAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
LineAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
ConeAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
ConeAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
CloudAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
CloudAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BurstAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BurstAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BlastAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BlastAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BeamAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BeamAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
AOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
AOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<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.
|
Modifier and Type | Method and Description |
---|---|
LinkedHashMap<Coord,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.
|
double[][] |
DijkstraMap.deteriorate(Coord... riskyPoints)
Used in conjunction with methods that depend on finding cover, like findCoveredAttackPath(), this method causes
specified risky points to be considered less safe, and will encourage a pathfinder to keep moving toward a goal
instead of just staying in cover forever (or until an enemy moves around the cover and ambushes the pathfinder).
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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,
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,
Set<Coord> targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first target found.
|
ArrayList<Coord> |
DijkstraMap.findNearestMultiple(Coord start,
int limit,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPath(int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPath(int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPathPreScanned(Coord target)
Intended primarily for internal use.
|
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.
|
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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
FOVCache cache,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
LinkedHashMap<Coord,Double> |
DijkstraMap.floodFill(int radius,
Coord... starts)
A simple limited flood-fill that returns a LinkedHashMap of Coord keys to the Double values in the DijkstraMap, only
calculating out to a number of steps determined by limit.
|
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.
|
ArrayList<Coord> |
WaypointPathfinder.goBackToPath(Coord currentPosition,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> targets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
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 boolean[][] |
ZOI.increasing(double[][] dm,
Coord[] inf) |
int[] |
ZOI.nearestInfluences(Coord point)
This can be given a Coord to check in the results of the latest calculate() call.
|
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.
|
double[][] |
DijkstraMap.relax(Coord... saferPoints)
Used in conjunction with methods that depend on finding cover, like findCoveredAttackPath(), this method causes
specified safer points to be considered more safe, and will make a pathfinder more likely to enter those places
if they were considered dangerous earlier (due to calling deteriorate()).
|
void |
DijkstraMap.resetCell(Coord pt)
Reverts a cell to the value stored in the original state of the level as known by physicalMap.
|
void |
PointAOE.setCenter(Coord center) |
void |
CloudAOE.setCenter(Coord center) |
void |
BurstAOE.setCenter(Coord center) |
void |
BlastAOE.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 |
LineAOE.setEnd(Coord end) |
void |
BeamAOE.setEnd(Coord end) |
void |
ConeAOE.setEndCenter(Coord endCenter) |
protected void |
DijkstraMap.setFresh(Coord pt,
double counter) |
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 |
ZOI.setInfluences(Coord[][] influences)
Changes the influencing groups.
|
void |
PointAOE.setOrigin(Coord origin) |
void |
LineAOE.setOrigin(Coord origin) |
void |
ConeAOE.setOrigin(Coord origin) |
void |
CloudAOE.setOrigin(Coord origin) |
void |
BurstAOE.setOrigin(Coord origin) |
void |
BlastAOE.setOrigin(Coord origin) |
void |
BeamAOE.setOrigin(Coord origin) |
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 |
PointAOE.shift(Coord aim) |
void |
LineAOE.shift(Coord aim) |
void |
ConeAOE.shift(Coord aim) |
void |
CloudAOE.shift(Coord aim) |
void |
BurstAOE.shift(Coord aim) |
void |
BlastAOE.shift(Coord aim) |
void |
BeamAOE.shift(Coord aim) |
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.
|
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 |
---|---|
double[][] |
DijkstraMap.deteriorate(List<Coord> riskyPoints)
Used in conjunction with methods that depend on finding cover, like findCoveredAttackPath(), this method causes
specified risky points to be considered less safe, and will encourage a pathfinder to keep moving toward a goal
instead of just staying in cover forever (or until an enemy moves around the cover and ambushes the pathfinder).
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
FOVCache cache,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPath(int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int minPreferredRange,
int maxPreferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findAttackPathLarge(int size,
int moveLength,
int preferredRange,
LOS los,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int preferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), until a cell is reached with
a distance from a goal that is at equal to preferredRange,
which may go further from a goal if the preferredRange has not been met at the current distance.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOV fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
FOVCache fov,
boolean seekDistantGoals,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findCoveredAttackPath(int moveLength,
int minPreferredRange,
int maxPreferredRange,
double coverPreference,
Set<Coord> impassable,
Set<Coord> onlyPassable,
List<Threat> threats,
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 while staying in areas that none of the
given threats are able to see (which should prevent them from attacking), 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.
|
ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findFleePath(int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findFleePathLarge(int size,
int length,
double preferLongerPaths,
Set<Coord> impassable,
Set<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,
Set<Coord> targets)
Recalculate the Dijkstra map until it reaches a Coord in targets, then returns the first target found.
|
ArrayList<Coord> |
DijkstraMap.findNearestMultiple(Coord start,
int limit,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPath(int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPath(int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findPathLarge(int size,
int length,
Set<Coord> impassable,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
FOVCache cache,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
FOVCache cache,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
FOVCache cache,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
ArrayList<Coord> |
DijkstraMap.findTechniquePath(int moveLength,
Technique tech,
char[][] dungeon,
LOS los,
Set<Coord> impassable,
Set<Coord> allies,
Coord start,
Set<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.
|
ArrayList<Coord> |
WaypointPathfinder.goBackToPath(Coord currentPosition,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> targets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> targets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
Technique.idealLocations(Coord user,
Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
PointAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
PointAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
LineAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
LineAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
ConeAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
ConeAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
CloudAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
CloudAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BurstAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BurstAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BlastAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BlastAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BeamAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BeamAOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
AOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions)
Returns a LinkedHashMap 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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
AOE.idealLocations(Set<Coord> targets,
Set<Coord> requiredExclusions)
Returns a LinkedHashMap 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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
PointAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
PointAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
PointAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
LineAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
LineAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
LineAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
ConeAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
ConeAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
ConeAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
CloudAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
CloudAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
CloudAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BurstAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BurstAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BurstAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BlastAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BlastAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BlastAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BeamAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BeamAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
BeamAOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<Coord> requiredExclusions) |
LinkedHashMap<Coord,ArrayList<Coord>> |
AOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
AOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<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.
|
LinkedHashMap<Coord,ArrayList<Coord>> |
AOE.idealLocations(Set<Coord> priorityTargets,
Set<Coord> lesserTargets,
Set<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.
|
boolean |
PointAOE.mayContainTarget(Set<Coord> targets) |
boolean |
LineAOE.mayContainTarget(Set<Coord> targets) |
boolean |
ConeAOE.mayContainTarget(Set<Coord> targets) |
boolean |
CloudAOE.mayContainTarget(Set<Coord> targets) |
boolean |
BurstAOE.mayContainTarget(Set<Coord> targets) |
boolean |
BlastAOE.mayContainTarget(Set<Coord> targets) |
boolean |
BeamAOE.mayContainTarget(Set<Coord> targets) |
boolean |
AOE.mayContainTarget(Set<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.
|
double[][] |
DijkstraMap.partialScan(int limit,
Set<Coord> impassable)
Recalculate the Dijkstra map up to a limit and return it.
|
double[][] |
DijkstraMap.relax(List<Coord> saferPoints)
Used in conjunction with methods that depend on finding cover, like findCoveredAttackPath(), this method causes
specified safer points to be considered more safe, and will make a pathfinder more likely to enter those places
if they were considered dangerous earlier (due to calling deteriorate()).
|
double[][] |
DijkstraMap.scan(Set<Coord> impassable)
Recalculate the Dijkstra map and return it.
|
double[][] |
DijkstraMap.scan(Set<Coord> impassable,
int size)
Recalculate the Dijkstra map for a creature that is potentially larger than 1x1 cell and return it.
|
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) |
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 measurement)
Constructs a Zone of Influence map.
|
ZOI(Coord[] influences,
char[][] map,
Radius measurement)
Constructs a Zone of Influence map.
|
Modifier and Type | Field and Description |
---|---|
protected Coord[] |
FOVCache.lightSources |
Coord |
SpatialMap.SpatialTriple.position |
protected Coord[][] |
FOVCache.waves |
Modifier and Type | Field and Description |
---|---|
HashMap<Coord,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 LinkedHashMap<Coord,Integer> |
FOVCache.lights |
protected LinkedHashMap<Coord,SpatialMap.SpatialTriple<I,E>> |
SpatialMap.positionMapping |
HashMap<Coord,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).
|
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.
|
ArrayList<ArrayList<Coord>> |
MultiSpill.spreadPattern
Each spiller in the MultiSpill corresponds to a list of points that it will randomly fill, starting with the
initial point for each spiller passed to start(), in order of when they are reached.
|
Modifier and Type | Method and Description |
---|---|
Coord[] |
FOVCache.calculateLOS(int startX,
int startY,
int endX,
int endY)
Calculates an array of Coord positions that can be seen along the line from the given start point and end point.
|
Coord |
Radius.extend(Coord center,
Coord middle,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
Coord |
SpatialMap.getPosition(I i)
Gets the position of the element with the given identity.
|
Coord |
Radius.onUnitShape(double distance,
RNG rng) |
Coord[] |
FOVCache.sortedLOS(int startX,
int startY,
int endX,
int endY)
Calculates an array of Coord positions that can be seen along the line from the given start point and end point.
|
Modifier and Type | Method and Description |
---|---|
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).
|
Set<Coord> |
Radius.expand(int distance,
int width,
int height,
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.
|
HashMap<Coord,Double> |
SoundMap.findAlerted(Set<Coord> creatures,
Map<Coord,Double> extraSounds)
Scans the dungeon using SoundMap.scan, adding any positions in extraSounds to the group of known sounds before
scanning.
|
Queue<Coord> |
LOS.getLastPath()
Returns the path of the last LOS calculation, with the starting point as
the head of the queue.
|
Set<Coord> |
Radius.perimeter(Coord center,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
Set<Coord> |
Radius.pointsInside(Coord center,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
Iterator<Coord> |
SpatialMap.positionIterator()
Iterates through positions in insertion order; has less predictable iteration order than the other iterators.
|
LinkedHashSet<Coord> |
SpatialMap.positions()
Get a Set of all positions used for values in this data structure, returning a LinkedHashSet (defensively copying
the key set used internally) for its stable iteration order.
|
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).
|
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).
|
List<Coord> |
Splash.spill(RNG rng,
char[][] level,
Coord start,
int volume) |
static List<Coord> |
Splash.spill(RNG rng,
char[][] level,
Coord start,
int volume,
Set<Character> impassable) |
ArrayList<Coord> |
Spill.start(Coord entry,
int volume,
Set<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
ArrayList<ArrayList<Coord>> |
MultiSpill.start(LinkedHashMap<Coord,Double> entries,
int volume,
Set<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
ArrayList<ArrayList<Coord>> |
MultiSpill.start(List<Coord> entries,
int volume,
Set<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.
|
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.
|
Set<Coord> |
Radius.perimeter(Coord center,
int radiusLength,
boolean surpassEdges,
int width,
int height) |
Set<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 |
Spill.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 |
MultiSpill.resetCell(Coord pt)
Reverts a cell to an unfilled state (false in spillMap).
|
protected void |
Spill.setFresh(Coord pt) |
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.
|
List<Coord> |
Splash.spill(RNG rng,
char[][] level,
Coord start,
int volume) |
static List<Coord> |
Splash.spill(RNG rng,
char[][] level,
Coord start,
int volume,
Set<Character> impassable) |
ArrayList<Coord> |
Spill.start(Coord entry,
int volume,
Set<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
static Direction |
Direction.toGoTo(Coord from,
Coord to) |
Modifier and Type | Method and Description |
---|---|
Set<Coord> |
Radius.expand(int distance,
int width,
int height,
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.
|
HashMap<Coord,Double> |
SoundMap.findAlerted(Set<Coord> creatures,
Map<Coord,Double> extraSounds)
Scans the dungeon using SoundMap.scan, adding any positions in extraSounds to the group of known sounds before
scanning.
|
HashMap<Coord,Double> |
SoundMap.findAlerted(Set<Coord> creatures,
Map<Coord,Double> extraSounds)
Scans the dungeon using SoundMap.scan, adding any positions in extraSounds to the group of known sounds before
scanning.
|
ArrayList<E> |
SpatialMap.getManyPositions(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 boolean[][] |
MimicFill.markSample(boolean[][] sample,
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.
|
double[][][] |
FOVCache.pathFOV(List<Coord> path,
int fovRange)
Given a path as a List of Coords (such as one produced by DijkstraMap.getPath()), this method will look up the
FOV for the given fovRange at each Coord, and returns an array of full FOV maps where each map is the union
of the FOV centered on a Coord in path with all FOVs centered on previous Coords in path.
|
short[][] |
FOVCache.pathFOVPacked(List<Coord> path,
int fovRange)
Given a path as a List of Coords (such as one produced by DijkstraMap.getPath()), this method will look up the
FOV for the given fovRange at each Coord, and returns an array of packed FOV maps where each map is the union
of the FOV centered on a Coord in path with all FOVs centered on previous Coords in path.
|
ArrayList<Coord> |
Spill.start(Coord entry,
int volume,
Set<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
ArrayList<ArrayList<Coord>> |
MultiSpill.start(LinkedHashMap<Coord,Double> entries,
int volume,
Set<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
ArrayList<ArrayList<Coord>> |
MultiSpill.start(LinkedHashMap<Coord,Double> entries,
int volume,
Set<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
ArrayList<ArrayList<Coord>> |
MultiSpill.start(List<Coord> entries,
int volume,
Set<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
ArrayList<ArrayList<Coord>> |
MultiSpill.start(List<Coord> entries,
int volume,
Set<Coord> impassable)
Recalculate the spillMap and return the spreadPattern.
|
double[][] |
FOVCache.teamFOV(Map<Coord,Integer> team)
In games that have multiple characters who should share one FOV map, this method should provide optimal
performance when collecting several cached FOV maps into one full map.
|
short[] |
FOVCache.teamFOVPacked(Map<Coord,Integer> team)
In games that have multiple characters who should share one FOV map, this method should provide optimal
performance when collecting several cached FOV maps into one packed map.
|
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 |
---|
FOVCache(char[][] map,
int maxRadius,
int maxLOSRadius,
Radius radiusKind,
int threadCount,
Map<Coord,Integer> lights)
Create an FOVCache for a given map (as a char[][]), caching all FOV radii from 0 up to and including maxRadius,
using the given Radius enum to determine FOV shape.
|
SpatialMap(Collection<Coord> coords,
Collection<I> ids,
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() |
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[] |
RoomFinder.mouths
When a RoomFinder is constructed, it stores all points of rooms that are adjacent to another region here.
|
Coord |
SectionDungeonGenerator.stairsDown |
Coord |
DungeonGenerator.stairsDown |
Coord |
SectionDungeonGenerator.stairsUp |
Coord |
DungeonGenerator.stairsUp |
Coord[] |
MapModule.validDoors
Stores Coords just outside the contents of the MapModule, where doors are allowed to connect into this.
|
Modifier and Type | Field and Description |
---|---|
ArrayList<Coord> |
MapModule.bottomDoors |
LinkedHashMap<Coord,MapModule> |
ModularMapGenerator.displacement |
ArrayList<Coord> |
MapModule.leftDoors |
ArrayList<Coord> |
MapModule.rightDoors |
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.
|
Coord |
Rectangle.getBottomLeft() |
Coord |
Rectangle.Impl.getBottomLeft() |
static Coord |
DungeonUtility.getRandomCell(RNG rng,
char[][] map,
Set<Character> acceptable,
int frustration) |
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 |
---|---|
protected static List<Coord> |
MixedGenerator.basicPoints(int width,
int height,
RNG rng)
Internal use.
|
static Iterator<Coord> |
Rectangle.Utils.cells(Rectangle r)
Use
Rectangle.Utils.cellsList(Rectangle) if you want them all. |
static List<Coord> |
Rectangle.Utils.cellsList(Rectangle r)
Use
Rectangle.Utils.cellsList(Rectangle) if you may stop before the end of
the list, you'll save some memory. |
protected static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.crossConnect(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
protected static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.crossConnect(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
LinkedHashSet<LinkedHashSet<Coord>> |
Placement.getAlongStraightWalls()
Gets a LinkedHashSet of LinkedHashSet of Coord, where each inner LinkedHashSet of Coord refers to a placement
region along a straight wall with length 3 or more, not including corners.
|
LinkedHashSet<LinkedHashSet<Coord>> |
Placement.getCenters()
Gets a LinkedHashSet of LinkedHashSet of Coord, where each inner LinkedHashSet of Coord refers to a room's cells
that are furthest from the walls, and each Coord is one of those central positions.
|
List<Coord> |
MetsaMapFactory.getCities() |
LinkedHashSet<LinkedHashSet<Coord>> |
Placement.getCorners()
Gets a LinkedHashSet of LinkedHashSet of Coord, where each inner LinkedHashSet of Coord refers to a room's
corners, and each Coord is one of those corners.
|
LinkedHashSet<Coord> |
Placement.getHidingPlaces(Radius radiusStrategy,
int range)
Gets a LinkedHashSet 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.
|
protected static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.listToMap(List<Coord> sequence) |
protected static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.listToMap(List<Coord> sequence) |
protected LinkedHashSet<Coord> |
SectionDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt) |
protected LinkedHashSet<Coord> |
LegacyDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt)
Deprecated.
|
protected LinkedHashSet<Coord> |
DungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt) |
protected LinkedHashSet<Coord> |
SectionDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected LinkedHashSet<Coord> |
LegacyDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt1,
Coord pt2)
Deprecated.
|
protected LinkedHashSet<Coord> |
DungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected LinkedHashSet<Coord> |
SectionDungeonGenerator.removeNearby(LinkedHashSet<Coord> coll,
char[][] disallowed) |
static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.removeSomeOverlap(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.removeSomeOverlap(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.removeSomeOverlap(int width,
int height,
List<Coord> sequence) |
static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.removeSomeOverlap(int width,
int height,
List<Coord> sequence) |
protected LinkedHashSet<Coord> |
LegacyDungeonGenerator.viableDoorways(boolean doubleDoors,
char[][] map)
Deprecated.
|
protected LinkedHashSet<Coord> |
DungeonGenerator.viableDoorways(boolean doubleDoors,
char[][] map) |
protected LinkedHashSet<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.
|
static boolean |
Rectangle.Utils.contains(Iterable<? extends Rectangle> rs,
Coord c) |
static boolean |
Rectangle.Utils.contains(Rectangle r,
Coord c) |
static boolean |
DungeonUtility.inLevel(char[][] 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.
|
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 LinkedHashSet<Coord> |
SectionDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt) |
protected LinkedHashSet<Coord> |
LegacyDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt)
Deprecated.
|
protected LinkedHashSet<Coord> |
DungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt) |
protected LinkedHashSet<Coord> |
SectionDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected LinkedHashSet<Coord> |
LegacyDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt1,
Coord pt2)
Deprecated.
|
protected LinkedHashSet<Coord> |
DungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt1,
Coord pt2) |
Modifier and Type | Method and Description |
---|---|
static boolean |
Rectangle.Utils.containsAny(Rectangle r,
Collection<Coord> cs) |
protected static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.crossConnect(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
protected static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.crossConnect(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
protected static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.listToMap(List<Coord> sequence) |
protected LinkedHashSet<Coord> |
SectionDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt) |
protected LinkedHashSet<Coord> |
LegacyDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt)
Deprecated.
|
protected LinkedHashSet<Coord> |
DungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt) |
protected LinkedHashSet<Coord> |
SectionDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected LinkedHashSet<Coord> |
LegacyDungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt1,
Coord pt2)
Deprecated.
|
protected LinkedHashSet<Coord> |
DungeonGenerator.removeAdjacent(LinkedHashSet<Coord> coll,
Coord pt1,
Coord pt2) |
protected LinkedHashSet<Coord> |
SectionDungeonGenerator.removeNearby(LinkedHashSet<Coord> coll,
char[][] disallowed) |
static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.removeSomeOverlap(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.removeSomeOverlap(int width,
int height,
LinkedHashMap<Coord,List<Coord>> connections) |
static LinkedHashMap<Coord,List<Coord>> |
SymmetryDungeonGenerator.removeSomeOverlap(int width,
int height,
List<Coord> sequence) |
Constructor and Description |
---|
Impl(Coord bottomLeft,
int width,
int height) |
MapModule(char[][] map,
Coord[] 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).
|
MapModule(char[][] map,
Coord[] 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,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
MixedGenerator(int width,
int height,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
MixedGenerator(int width,
int height,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections,
float roomSizeMultiplier)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
MixedGenerator(int width,
int height,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections,
float roomSizeMultiplier)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
MixedGenerator(int width,
int height,
RNG rng,
List<Coord> sequence)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SymmetryDungeonGenerator(int width,
int height,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SymmetryDungeonGenerator(int width,
int height,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SymmetryDungeonGenerator(int width,
int height,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections,
float roomSizeMultiplier)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SymmetryDungeonGenerator(int width,
int height,
RNG rng,
LinkedHashMap<Coord,List<Coord>> connections,
float roomSizeMultiplier)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
SymmetryDungeonGenerator(int width,
int height,
RNG rng,
List<Coord> sequence)
This prepares a map generator that will generate a map with the given width and height, using the given RNG.
|
Modifier and Type | Class and Description |
---|---|
class |
Coord3D
Generic three dimensional coordinate class.
|
Modifier and Type | Field and Description |
---|---|
protected Coord[] |
Region.coords |
protected Coord[] |
PlannedAStar.landmarks |
protected Coord[][] |
AStarSearch.parent |
protected Coord |
AStarSearch.start |
protected Coord |
AStarSearch.target |
Modifier and Type | Field and Description |
---|---|
protected HashSet<Coord> |
AStarSearch.open |
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 |
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.
|
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).
|
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(RNG rng)
Gets a single random Coord from this using the given RNG (which can be seeded); returns null if this is empty.
|
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.
|
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."
|
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.
|
static Coord[] |
CoordPacker.randomSample(short[] packed,
double fraction,
RNG rng)
Gets a random subset of positions that are "on" in the given packed array, without unpacking it, and returns
them as a Coord[].
|
static Coord[] |
CoordPacker.randomSeparated(short[] packed,
int separation,
RNG rng)
Gets the positions that are "on" in the given packed array, without unpacking it, repeatedly goes through a
number of "on" cells equal to fraction and stores a random one of those cells as a Coord, and returns the
accumulated random portion of positions as a Coord[].
|
static Coord |
PoissonDisk.randomUnblockedTile(Coord minPosition,
Coord maxPosition,
char[][] map,
RNG rng,
HashSet<Character> blocked)
Finds a random Coord where the x and y match up to a [x][y] location on map that has any value not in blocking.
|
Coord |
Coord.scale(int i) |
Coord |
Coord.scale(int i,
int j) |
Coord |
Coord.setX(int x) |
Coord |
Coord.setY(int y) |
static Coord |
CoordPacker.singleRandom(short[] packed,
RNG rng)
Gets a single randomly chosen position that is "on" in the given packed array, without unpacking it, and returns
it as a Coord or returns null of the array is empty.
|
protected Coord |
AStarSearch.smallestF() |
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 |
---|---|
List<Coord> |
NeuralParticle.asList()
Returns a list of the current distribution.
|
List<Coord> |
Elias.getLastPath() |
static List<Coord> |
OrthoLine.line(Coord start,
Coord end)
Draws a line from start to end using only N/S/E/W movement.
|
List<Coord> |
Elias.line(Coord start,
Coord end) |
static List<Coord> |
DDALine.line(Coord start,
Coord end)
Draws a line from start to end using the DDA algorithm.
|
List<Coord> |
Elias.line(Coord start,
Coord end,
double brightnessThreshold) |
static List<Coord> |
WobblyLine.line(Coord start,
Coord end,
int width,
int height)
Draws a line from start to end using the Drunkard's Walk algorithm.
|
List<Coord> |
Elias.line(double startx,
double starty,
double endx,
double endy)
Gets the line between the two points.
|
List<Coord> |
Elias.line(double startx,
double starty,
double endx,
double endy,
double brightnessThreshold)
Gets the line between the two points.
|
static List<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 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 List<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 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 List<Coord> |
WobblyLine.line(int startX,
int startY,
int endX,
int endY,
int width,
int height,
double weight,
RNG rng)
Draws a line from (startX, startY) to (endX, endY) using the Drunkard's Walk algorithm.
|
static Queue<Coord> |
Bresenham.line2D(Coord a,
Coord b)
Generates a 2D Bresenham line between two points.
|
static Queue<Coord> |
Bresenham.line2D(int startX,
int startY,
int endX,
int endY)
Generates a 2D Bresenham line between two points.
|
Queue<Coord> |
AStarSearch.path(Coord start,
Coord target)
Finds an A* path to the target from the start.
|
Queue<Coord> |
AStarSearch.path(int startx,
int starty,
int targetx,
int targety)
Finds an A* path to the target from the start.
|
static ArrayList<Coord> |
CoordPacker.randomPortion(short[] packed,
int size,
RNG rng)
Gets a fixed number of randomly chosen positions that are "on" in the given packed array, without unpacking it,
and returns a List of Coord with a count equal to size (or less if there aren't enough "on" cells).
|
static ArrayList<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 ArrayList<Coord> |
PoissonDisk.sampleCircle(Coord center,
float radius,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
RNG rng)
Get a list of Coords, each randomly positioned around the given center out to the given radius (measured with
Euclidean distance, so a true circle), but with the given minimum distance from any other Coord in the list.
|
static ArrayList<Coord> |
PoissonDisk.sampleMap(char[][] map,
float minimumDistance,
RNG rng,
Character... blocking) |
static ArrayList<Coord> |
PoissonDisk.sampleMap(Coord minPosition,
Coord maxPosition,
char[][] map,
float minimumDistance,
RNG rng,
Character... blocking) |
static ArrayList<Coord> |
PoissonDisk.sampleRectangle(Coord minPosition,
Coord maxPosition,
float minimumDistance,
int maxX,
int maxY)
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 ArrayList<Coord> |
PoissonDisk.sampleRectangle(Coord minPosition,
Coord maxPosition,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
RNG rng)
Get a list of Coords, each randomly positioned within the rectangle between the given minPosition and
maxPosition, but with the given minimum distance from any other Coord in the list.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
NeuralParticle.add(Coord point)
Adds a single specific point to the distribution.
|
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.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.
|
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; 0 is up.
|
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.
|
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.
|
boolean |
Coord.isAdjacent(Coord c) |
static List<Coord> |
OrthoLine.line(Coord start,
Coord end)
Draws a line from start to end using only N/S/E/W movement.
|
List<Coord> |
Elias.line(Coord start,
Coord end) |
static List<Coord> |
DDALine.line(Coord start,
Coord end)
Draws a line from start to end using the DDA algorithm.
|
List<Coord> |
Elias.line(Coord start,
Coord end,
double brightnessThreshold) |
static List<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 Queue<Coord> |
Bresenham.line2D(Coord a,
Coord b)
Generates a 2D Bresenham line between two points.
|
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"
|
Queue<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,
RNG rng,
HashSet<Character> blocked)
Finds a random Coord where the x and y match up to a [x][y] location on map that has any value not in blocking.
|
static 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 ArrayList<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 ArrayList<Coord> |
PoissonDisk.sampleCircle(Coord center,
float radius,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
RNG rng)
Get a list of Coords, each randomly positioned around the given center out to the given radius (measured with
Euclidean distance, so a true circle), but with the given minimum distance from any other Coord in the list.
|
static ArrayList<Coord> |
PoissonDisk.sampleMap(Coord minPosition,
Coord maxPosition,
char[][] map,
float minimumDistance,
RNG rng,
Character... blocking) |
static ArrayList<Coord> |
PoissonDisk.sampleRectangle(Coord minPosition,
Coord maxPosition,
float minimumDistance,
int maxX,
int maxY)
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 ArrayList<Coord> |
PoissonDisk.sampleRectangle(Coord minPosition,
Coord maxPosition,
float minimumDistance,
int maxX,
int maxY,
int pointsPerIteration,
RNG rng)
Get a list of Coords, each randomly positioned within the rectangle between the given minPosition and
maxPosition, but with the given minimum distance from any other Coord in the list.
|
void |
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 adjacent)
|
Modifier and Type | Method and Description |
---|---|
static short[] |
CoordPacker.insertSeveralPacked(short[] original,
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 short[] |
CoordPacker.packSeveral(Collection<Coord> points)
Returns a new packed short[] containing the Coords in points as "on" cells, and all other cells "off"
|
static short[] |
CoordPacker.removeSeveralPacked(short[] original,
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) |
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 |
---|
Region(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 © 2012–2016. All rights reserved.