lineOfSight

lineOfSight

> Functions

Checks the line of sight between the start cell and the end cell, ignoring entities in the entityToIgnore array.

Example: if (lineOfSight(getCell(), getCell(enemy))

The algorithm is described as follows:

Parameters
Return
Demonstration

Click on a cell to display all cells that are in line of sight with it.