Expand description
An algorithm to determine if the line of sight between two coordinates on a board is blocked or not.
§Usage
Use Board::is_line_of_sight_blocked.
§Details
Assumes that (0, 0) is the bottom left corner,
and (x, y) is x units to the right and y units up.
NOTE: In the network standard, (y, x) is (usually?) used instead of (x, y).
Functions§
- is_
line_ of_ sight_ blocked - is_
line_ 🔒of_ sight_ blocked_ right_ slightly_ up - Works for line of sights from (0, 0) to (to.x, to.y), where to.y <= to.x (angles between 0 and 45°). Assumes (0, 0) and (to.x, to.y) are non-rock tiles.
- is_
line_ 🔒of_ sight_ blocked_ right_ up