bresenham¶
- bresenham(start: Tile, stop: Tile) NDArray[np.intc]¶
Uses Bresenham’s algorithm to determin line of sight.
Note that this isn’t a field of view algorithm; it does not check that any tile in the line in visible. It would be more accurate to say it is simply a line algorithm, but in the context of roguelikes, line of sight seems to be the accepted nomenclature.
- Parameters:
start – the Tile to start from
stop – the Tile to look at
- Returns:
A numpy array of tiles in the line