Class Index | File Index

Classes


Class LosCalculator

LosCalculator
Defined in: losCalculator.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
LosCalculator(Wargame, Force, Terrain, Map)
LosCalculator
Method Summary
Method Attributes Method Name and Description
 
checkForUnits(hexagonPoint)
method to check for units
 
method to draw los dots
 
method to get los text
 
method to get los range
 
method to check if los is clear
 
method to remove los dots
 
setLos(startingUnitIndex, startHexagonPoint, endHexagonPoint)
method to set los
 
method to set los array with grid range
Class Detail
LosCalculator(Wargame, Force, Terrain, Map)
LosCalculator
Parameters:
Wargame
{object}
Force
{object}
Terrain
{object}
Map
{object} LosCalculator is an object that calculates Line of Sight. The line of Sight provides range, bearing, and facing. The line of Sight also contains an array of the hexagons and hexsides on the path of the line of sight.
Method Detail
{boolean} checkForUnits(hexagonPoint)
method to check for units
Parameters:
hexagonPoint
{point} hexagon point
Returns:
{boolean} unitsPresent

drawLosDots()
method to draw los dots

{boolean} getLosText()
method to get los text
Returns:
{boolean} losText

{int} getRange()
method to get los range
Returns:
{int} range

{boolean} isLosClear()
method to check if los is clear
Returns:
{boolean} isClear

removeLosDots()
method to remove los dots

setLos(startingUnitIndex, startHexagonPoint, endHexagonPoint)
method to set los
Parameters:
startingUnitIndex
{integer} The unit index
startHexagonPoint
{point} start hexagon point
endHexagonPoint
{point} end hexagon point

setLosArrayWithGridRange()
method to set los array with grid range

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Oct 22 2018 10:38:39 GMT-0700 (PDT)