Battle Analysis: Wargame Calculators

Wargame Calculators

HexagonNameCalculator

getDisplayName() 
getHexagonPoint() 
getName() 
getX() 
getY() 
setMapViewPort(mapViewPort) 
setHexagonPoint(hexagonPoint) 
setName(name) 
setXY(x, y) 

MoveCalculator

addToRetreatHexagonList(index, hexagonPoint)
advanceIsValid(index, hexagonPoint) 
applyPhaseChangeRules()
calculateMoveCost (index, startHexagonPoint, endHexagonPoint) 
calculateReinforceMoveCost(index, hexagonPoint) 
clearRetreatHexagonList()
getEntranceMoveCost (index, hexagonPoint) 
eliminateUnit(index)
getMoveInfo(index)
moveIsAcrossRiverNoBridge(hexsidePoint) 
moveIsInRange(index, startHexagonPoint, endHexagonPoint) 
moveIsTraverse(startHexagonPoint, endHexagonPoint, attribute) 
moveIsValid(index, endHexagonPoint) 
moveOverEnemyIsAllowed()
moveOverRunEnemyIsAllowed()
moveWillCauseStop(index, endHexagonPoint) 
resetRemainingAdvancingUnits()
retreatIsBlocked(index) 
retreatIsBlockedtoHexagonPoint(index, endHexagonPoint) 
retreatIsValid(index, hexagonPoint) 
setMapType(mapType)
setStatus(index, status, attackingForceName)
setRetreatStartXY(index)
setUnitExitZone(index, exitZoneName, turn)
setCanLeaveZOCrule(canLeaveZOC) 
terrainIsProhibited (index, startHexagonPoint, endHexagonPoint) 
unitCanExit(index, hexagonPoint) 
unitCanStart(index) 
unitHasMoveAmountAvailable( index, moveAmount, moveAmountUsed) 
unitWillUseMaxMove( index, moveAmount, moveAmountUsed) 
updateMoveStatus(index, hexagonPoint, moveAmount)
updatePlaceStatus(index, hexagonPoint)

CombatCalculator

allAreAttackingAcrossRiver (defenderIndex) 
applyCRTresults(defenderIndex, combatResults, dieRoll) 
applyPhaseChangeRules()
getArrayOfAttackers(combatNumber, forceName) 
getArrayOfCombatants(combatNumber, forceName) 
getArrayOfDefenders(combatNumber, forceName) 
getCombatOddsInfo(index)
getTotalAttackerStrength(combatNumber, forceName) 
getTotalDefenderStrength(combatNumber, forceName) 
overHalfAreAttackingAcrossRiver (defenderIndex) 
removeCombatListItem(attackerIndex, defenderIndex)
setCombatIndex(defenderIndex) 
setupCombatHexside(gridPoint)
someAreAttackingAcrossRiver(defenderIndex) 
undoAttackerSetup(index)
undoDefenderSetup(index)
unitCanAttack(index) 
unitIsFlanked(index) 

CombatResultsTable

initialize () 
getCombatOddsList(combatOddsIndex) 
getCombatResults(die, combatOddsIndex) 
getCombatResultsTableHTML() 
getMaxCombatOddsIndex() 
getResultsNameIndex(name)
setCombatResults(die, combatOddsIndex, results) 
setupCombatOddsTable() 

WargameCalculator

applyPhaseChangeRules()

VictoryCalculator

applyPhaseChangeRules()
checkVictoryConditions() 
getVictoryInfo() 
getVictoryStatus() 
isWargameOver() 

ZocCalculator

hexagonIsZOC(hexagonPoint, forceName) 
setMapType(mapType)
unitIsZOC(index) 
unitIsZOCbyId(id) 
unitCanBeAttacked(index) 

LosCalculator

isLosClear()
getLosText()
setLosArrayWithGridRange()
setLos(startingUnitIndex, startHexagonPoint, endHexagonPoint)
drawLosDots()
checkForUnits(hexagonPoint)
getRange()
removeLosDots()

LocCalculator

addStartLocHexagon(locHexagonName, locForceId) 
addLocHexagonPoint(hexagonPoint, locForceId) 
addLocHexagonPoint(hexagonPoint, locForceId) 
addLocHexagonPoint(hexagonPoint, locForceId) 
calculateLoc(forceId) 
getForceIdOfHexagonInStartLocArray(hexagonPoint) 
hexagonIsInStartLocArray(hexagonPoint, forceId) 
hexagonIsInLocArray(hexagonPoint, forceId) 
hexagonIsNextToLOC(hexagonPoint, forceId) 
hexagonIsStartLOC(hexagonPoint, forceId) 
getMapArray() 
getMapArray2( start, endX, endY ) 
getLocArray()
getLoc()
getStartLoc()

StackingCalculator

stackingIsValid(hexagonPoint)
stackingIsValidWithUnit(index, endHexagonPoint)

SvgCounterCalculator

getUnitTypeTemplate(unitType) 
getCounterTemplate(fillColor, strokeColor, strokeWidth, strokeOpacity) 
getSVGtext(unitData, scale) 
getSVGdata(unitData, scale)