| Constructor and Description |
|---|
CoordinateCell(C cell)
CoordinateCell constructor.
|
| Modifier and Type | Method and Description |
|---|---|
C |
cell()
Get the related map cell
|
Direction |
directionTo(C target)
Compute the direction to the target cell
https://github.com/Emudofus/Dofus/blob/1.29/ank/battlefield/utils/Pathfinding.as#L204
|
Direction |
directionTo(CoordinateCell<C> target)
Compute the direction to the target cell
https://github.com/Emudofus/Dofus/blob/1.29/ank/battlefield/utils/Pathfinding.as#L204
|
@NonNegative int |
distance(C target)
Get the cell distance
Note: Do not compute a pythagorean distance, but "square" distance.
|
@NonNegative int |
distance(CoordinateCell<C> target)
Get the cell distance
Note: Do not compute a pythagorean distance, but "square" distance.
|
boolean |
equals(@Nullable Object o) |
int |
hashCode() |
@NonNegative int |
id()
Get the cell id
|
boolean |
is(int x,
int y)
Check if the cell is at the given coordinates
|
int |
x() |
int |
y() |
public CoordinateCell(C cell)
MapCell.coordinate() method instead of directly call the constructorcell - The cell to wrapFor get the {@link CoordinateCell} instance from a cell@Pure public C cell()
@Pure public @NonNegative int id()
@Pure public int x()
@Pure public int y()
@Pure
public boolean is(int x,
int y)
x - The X coordinatey - The Y coordinate@Pure public Direction directionTo(CoordinateCell<C> target)
target - The target cellpublic Direction directionTo(C target)
target - The target cell@Pure public @NonNegative int distance(CoordinateCell<C> target)
target - The target cellpublic @NonNegative int distance(C target)
target - The target cellCopyright © 2022. All rights reserved.