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