| Class | Description |
|---|---|
| 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
|
| CellSight<C extends BattlefieldCell> |
Handle the line of sight from a given cell
|
Copyright © 2022. All rights reserved.