| Package | Description |
|---|---|
| fr.arakne.utils.maps | |
| fr.arakne.utils.maps.sight |
| Modifier and Type | Interface and Description |
|---|---|
interface |
BattlefieldCell<C extends BattlefieldCell>
Base type for a battlefield cell
|
| Modifier and Type | Class and Description |
|---|---|
class |
BattlefieldSight<C extends BattlefieldCell>
Utility class for compute line of sights
Note: The used algorithm is not exactly same as the client's one, some differences can occurs
Algorithm :
- Get coordinates of the two cells
- "draw" a line between the cells :
- Compute the vector between those cells
- Creates the function : Y = ySlope * X + yAtZero with
- For each X between the cells compute the related Y using the function
- Increments Y cell by cell to reach the computed Y
- Check the cell line of sight value
- If the sight is blocked, return false
|
class |
CellSight<C extends BattlefieldCell>
Handle the line of sight from a given cell
|
Copyright © 2022. All rights reserved.