| Package | Description |
|---|---|
| fr.arakne.utils.maps | |
| fr.arakne.utils.maps.sight |
| Modifier and Type | Method and Description |
|---|---|
default CellSight<C> |
BattlefieldCell.sight()
Get the current cell sight
This method is equivalent to
new CellSight<>(cell)
Note: each call of this method will recreate a new CellSight instance
{@code
// Check if the "target" cell is accessible from the current cell
if (! |
| Modifier and Type | Method and Description |
|---|---|
CellSight<C> |
BattlefieldSight.from(C cell)
Get the line of sight of a cell
Usage:
final BattlefieldSight<FightCell> sight = new BattlefieldSight<>(map);
sight.from(fighter.cell()).to(target.cell()).forEachRemaining(cell -> {
// Iterator on line of sight
});
|
CellSight<C> |
BattlefieldSight.from(CoordinateCell<C> cell)
Get the line of sight of a cell
Usage:
final BattlefieldSight<FightCell> sight = new BattlefieldSight<>(map);
final CoordinateCell<FightCell> current = new CoordinateCell<>(fighter.cell());
sight.from(current).to(target.cell()).forEachRemaining(cell -> {
// Iterator on line of sight
});
|
Copyright © 2022. All rights reserved.