Class Index | File Index

Classes


Class MoveCalculatorDemo

MoveCalculatorDemo
Defined in: moveCalculatorDemo.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
MoveCalculatorDemo(Wargame, Force, Terrain, map)
MoveCalculatorDemo
Method Summary
Method Attributes Method Name and Description
 
advanceIsValid(index, hexagonPoint)
method to check if advance Is Valid
 
calculateMoveCost(index, startHexagonPoint, endHexagonPoint)
method to calculate move cost
 
calculateReinforceMoveCost(index, hexagonPoint)
method to calculate reinforce cost
 
getEntranceMoveCost(index, hexagonPoint)
method to calculate entrance cost
 
method to see if move is across a river without using a bridge
 
moveIsInRange(index, startHexagonPoint, endHexagonPoint)
method to see if move is in range
 
moveIsTraverse(startHexagonPoint, endHexagonPoint, attribute)
method to see if move is traversing over terrain type
 
moveIsValid(index, endHexagonPoint)
method to see if move is valid
 
moveWillCauseStop(index, endHexagonPoint)
method to see if move will cause stop
 
method to see if retreat is blocked
 
retreatIsBlockedtoHexagonPoint(index, endHexagonPoint)
method to see if retreat is blocked at hexagon point
 
retreatIsValid(index, endHexagonPoint)
method to see if retreat is valid
 
terrainIsProhibited(index, startHexagonPoint, endHexagonPoint)
method to see if terrain is prohibited
 
unitHasMoveAmountAvailable(index, moveAmount, moveAmountUsed)
method to see if unit has move amount
 
unitWillUseMaxMove(index, moveAmount, moveAmountUsed)
method to see if unit will use move amount
Class Detail
MoveCalculatorDemo(Wargame, Force, Terrain, map)
MoveCalculatorDemo
Parameters:
Wargame
{object}
Force
{object}
Terrain
{object}
map
Method Detail
{boolean} advanceIsValid(index, hexagonPoint)
method to check if advance Is Valid
Parameters:
index
{integer} The unit index in units array
hexagonPoint
{point} hexagon point of advance
Returns:
{boolean} isValid

{integer} calculateMoveCost(index, startHexagonPoint, endHexagonPoint)
method to calculate move cost
Parameters:
index
{integer} The unit index in units array
startHexagonPoint
{point}
endHexagonPoint
{point}
Returns:
{integer} moveCost

{integer} calculateReinforceMoveCost(index, hexagonPoint)
method to calculate reinforce cost
Parameters:
index
{integer} The unit index in units array
hexagonPoint
{point}
Returns:
{integer} moveCost

{integer} getEntranceMoveCost(index, hexagonPoint)
method to calculate entrance cost
Parameters:
index
{integer}
hexagonPoint
{point}
Returns:
{integer} moveCost

{boolean} moveIsAcrossRiverNoBridge(hexsidePoint)
method to see if move is across a river without using a bridge
Parameters:
hexsidePoint
{point}
Returns:
{boolean} moveIsAcrossRiverNoBridge

{boolean} moveIsInRange(index, startHexagonPoint, endHexagonPoint)
method to see if move is in range
Parameters:
index
{integer} The unit index in units array
startHexagonPoint
{point}
endHexagonPoint
{point}
Returns:
{boolean} rangeIsOne

{boolean} moveIsTraverse(startHexagonPoint, endHexagonPoint, attribute)
method to see if move is traversing over terrain type
Parameters:
startHexagonPoint
{point}
endHexagonPoint
{point}
attribute
{string}
Returns:
{boolean} moveIsTraverse

{boolean} moveIsValid(index, endHexagonPoint)
method to see if move is valid
Parameters:
index
{integer}
endHexagonPoint
{point}
Returns:
{boolean} isValid

{boolean} moveWillCauseStop(index, endHexagonPoint)
method to see if move will cause stop
Parameters:
index
{integer}
endHexagonPoint
{point}
Returns:
{boolean} willCauseStop

{boolean} retreatIsBlocked(index)
method to see if retreat is blocked
Parameters:
index
{integer}
Returns:
{boolean} isBlocked

{boolean} retreatIsBlockedtoHexagonPoint(index, endHexagonPoint)
method to see if retreat is blocked at hexagon point
Parameters:
index
{integer}
endHexagonPoint
{point}
Returns:
{boolean} isBlocked

{boolean} retreatIsValid(index, endHexagonPoint)
method to see if retreat is valid
Parameters:
index
{integer}
endHexagonPoint
{point}
Returns:
{boolean} isValid

{boolean} terrainIsProhibited(index, startHexagonPoint, endHexagonPoint)
method to see if terrain is prohibited
Parameters:
index
{integer}
startHexagonPoint
{point}
endHexagonPoint
{point}
Returns:
{boolean} isProhibited

{boolean} unitHasMoveAmountAvailable(index, moveAmount, moveAmountUsed)
method to see if unit has move amount
Parameters:
index
{integer}
moveAmount
{integer}
moveAmountUsed
{integer}
Returns:
{boolean} moveAmountAvailable

{boolean} unitWillUseMaxMove(index, moveAmount, moveAmountUsed)
method to see if unit will use move amount
Parameters:
index
{integer}
moveAmount
{integer}
moveAmountUsed
{integer}
Returns:
{boolean} willUseMaxMove

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jun 05 2017 11:46:30 GMT-0700 (PDT)