File: Games\WW2\Game.js

GamesByEmail
Class WW2Territory

Object
  
 
 
GamesByEmail.Territory
 
 
GamesByEmail.WW2Territory

All Implemented Interfaces:

Class


GamesByEmail.WW2Territory

extends Territory

Constructor Summary
GamesByEmail.WW2Territory(/*Territories*/ territories, /*Number*/ index, /*String*/ indexString, /*Game*/ game, /*Object*/ territory)
Creates a territory.

Field Summary

Fields inherited from GamesByEmail.Territory
adjacent, adjacentIndices, color, game, index, indexString, polygon, territories, title

Method Summary
 addRetreatTerritories(territories)
 addRetreatTerritory(territory)
 adjacentWithinRange(range, list)
 amphibiousAssaultOptionsHtml()
 amphibiousAssaultedCount()
 antiaircraftFireResolved()
StringBuilderappendOverlayHtml(/*StringBuilder*/ htmlBuilder)
Override to add HTML that shows above the territory.
 attackHtml()
 autoLandOrCrashExtraEnemyFighters()
 availableLandingSlots(power)
 battleBoardHtml(bottomHtml, selectHits, allowUnlanded, falseBackButton)
 battleCubeHtml(roll)
 blitzOnlyHtml()
 canManufactureAnother()
 canMoveThrough(powerIndex)
 canRetreat()
 canRetreatToTerritory(territory)
 canSpareAircraftCarrier()
 capture(power, originalPower, logPhase)
 changeFirstStrikeRolls(numHits)
 clearAttributes()
 clearForNextTurn()
 clearMoves()
 clearUnitsManufactured()
 clearUnlandedAmphibiousUnits()
 closeSecondaryAttack()
 combatHtml()
 conquer()
BooleancontainsPoint(/*Point*/ point)
Checks to see if a point is inside the territory's polygon.
 decrementUnitsManufactured()
 defensiveRetreatRank(power)
 destroyPlane(unit, team)
 dispose()
 dropSomeBombsHtml()
 droppedSomeBombsHtml()
 getAntiaircraftGun()
 getAttributes()
 getBattleBoardAmphibAssaultDetails(roll, allowUnlanded)
 getBattleBoardDetails(selectHits, allowUnlanded, firstStrike)
 getDefences(ourOwn)
 getIslands()
 getOverlayImageSrc()
 getShortestPathLength(path, territory, target, depth, range)
 getString()
 hasAntiaircraftGun()
 hasIndustry()
 hasRoomForAircraft(nonCombat, isFighter)
 hasRoomForFighter(nonCombat)
 hitString(hits, naval)
 hitStringIndex()
 holdingPower()
 incrementUnitsManufactured()
 isAmphibiousAssaulting(territory)
 isBlitzedOrUnopposed()
 isCanalTransitBlocked(toTerritory, powerIndex)
 isEnemy(powerIndex)
 isEnemyOccupied(checkLandUnits, checkSeaUnits, checkAirUnits, checkStrategicBombUnits)
 isFriendly(powerIndex)
 isFriendlyOccupied(checkLandUnits, checkSeaUnits, checkAirUnits, checkStrategicBombUnits)
 isHeld()
 isLand()
 isNeutral()
 isOccupied(powerIndex, checkLandUnits, checkSeaUnits, checkAirUnits, checkStrategicBombUnits)
 isSeaLocked()
 isSeaZone()
 isStraitsTransitBlocked(toTerritory, powerIndex)
 landPlane(unit, team, toTerritory, unlanded)
 landPlanesHtml()
 liberate(power, originalPower, logPhase)
 logPowerIndex()
 markDefenseOrderingNeeded()
 maximumOutput()
 moveUnits(unit, team, toTerritory, num, oldSpacesMoved, newSpacesMoved, markAsMoved, aaGunFlyover, strategicBombingRaid, transport)
 needsCombatResolved()
 needsPlanesLanded()
 neighboringPickup(transport, powerIndex)
 neighboringPickups(transport, powerIndex)
 nonCombatMovesHtml()
 occupySeaZoneHtml()
 orderCombatUnitsByCost()
 originalPower()
 preAmphibiousAssaultBattlesResolved()
 previewBattleBoard()
 processNonCombat()
 recordLandedPlanes(phase)
 recordUnitMovement(phase)
 resolveAmphibiousCombatHtml()
 retreat()
 retreatDefensiveSubs(toTerritory)
 retreatOptionsHtml()
 retreatTo(territory)
 selectHitStringIndex()
 setAttribute(attributeString)
 setAttributes(attributesString)
 setDefenseOrderHtml()
 setHoldingPower(powerIndex)
 setString(territoryString)
 shootDownSomePlanesHtml()
 shortestPathLength(territory, range)
 shotDownSomePlanesHtml()
 shouldDefensiveSubsRetreat()
 staticafyAmphibiousAssaultVessels()
 strategicBombingRaidResolved()
 takeOverNeutralHtml()
 trackHtml(point)
 transportCounts(powerIndex, unmovedOnly, canCarryMoreOnly, allowFriendly)
 unassignedUnitsOnTransports(attack)
 undestroyPlane(piece)
 undoAllLandings()
 undoNonCombat()
 unitAtNumber(unit, powerIndex, number)
 unitCount(unit, powerIndex, unmovedOnly, notUsedInBattleOnly)
 unitString(units, naval)
 updateAmphibiousAssault()
 updateAttackMoves()
 updateBlink()
 updateColor()
 updateDefences(ourOwn)
 updateNonCombatMoves()
 updateOrderStuff()
 updateRetreatTerritories()

Methods inherited from GamesByEmail.Territory
appendHtml, event, hideHilite, isColor, isOurs, setBlink, showHilite, showHiliteIfOurs

Methods inherited from Foundation.Class
getTypePath, isInstanceOf

Constructor Detail

WW2Territory

GamesByEmail.WW2Territory(/*Territories*/ territories,
                          /*Number*/ index,
                          /*String*/ indexString,
                          /*Game*/ game,
                          /*Object*/ territory)

Creates a territory.

Parameters:
territories - 
The parent territories collection.
index - 
The position of this piece in the parent pieces object.
indexString - 
The zero-padded index string of the position of this piece in the parent pieces object.
game - 
The game this territory is in.
territory - 
The data for this territory to inherit.

Method Detail

addRetreatTerritories

addRetreatTerritories(territories)
Parameters:
territories - 


addRetreatTerritory

addRetreatTerritory(territory)
Parameters:
territory - 


adjacentWithinRange

adjacentWithinRange(range,
                    list)
Parameters:
range - 

list - 


amphibiousAssaultOptionsHtml

amphibiousAssaultOptionsHtml()

amphibiousAssaultedCount

amphibiousAssaultedCount()

antiaircraftFireResolved

antiaircraftFireResolved()

appendOverlayHtml

StringBuilder appendOverlayHtml(/*StringBuilder*/ htmlBuilder)

Override to add HTML that shows above the territory.

Overrides:
appendOverlayHtml in class Territory
Parameters:
htmlBuilder - 
The builder to append the HTML for the territory.
Returns:
The string builder.

attackHtml

attackHtml()

autoLandOrCrashExtraEnemyFighters

autoLandOrCrashExtraEnemyFighters()

availableLandingSlots

availableLandingSlots(power)
Parameters:
power - 


battleBoardHtml

battleBoardHtml(bottomHtml,
                selectHits,
                allowUnlanded,
                falseBackButton)
Parameters:
bottomHtml - 

selectHits - 

allowUnlanded - 

falseBackButton - 


battleCubeHtml

battleCubeHtml(roll)
Parameters:
roll - 


blitzOnlyHtml

blitzOnlyHtml()

canManufactureAnother

canManufactureAnother()

canMoveThrough

canMoveThrough(powerIndex)
Parameters:
powerIndex - 


canRetreat

canRetreat()

canRetreatToTerritory

canRetreatToTerritory(territory)
Parameters:
territory - 


canSpareAircraftCarrier

canSpareAircraftCarrier()

capture

capture(power,
        originalPower,
        logPhase)
Parameters:
power - 

originalPower - 

logPhase - 


changeFirstStrikeRolls

changeFirstStrikeRolls(numHits)
Parameters:
numHits - 


clearAttributes

clearAttributes()

clearForNextTurn

clearForNextTurn()

clearMoves

clearMoves()

clearUnitsManufactured

clearUnitsManufactured()

clearUnlandedAmphibiousUnits

clearUnlandedAmphibiousUnits()

closeSecondaryAttack

closeSecondaryAttack()

combatHtml

combatHtml()

conquer

conquer()

containsPoint

Boolean containsPoint(/*Point*/ point)

Checks to see if a point is inside the territory's polygon.

Overrides:
containsPoint in class Territory
Parameters:
point - 
The point to check.
Returns:
True if the point is inclusively inside the polygon, else false.

decrementUnitsManufactured

decrementUnitsManufactured()

defensiveRetreatRank

defensiveRetreatRank(power)
Parameters:
power - 


destroyPlane

destroyPlane(unit,
             team)
Parameters:
unit - 

team - 


dispose

dispose()
Overrides:
dispose in class Territory

dropSomeBombsHtml

dropSomeBombsHtml()

droppedSomeBombsHtml

droppedSomeBombsHtml()

getAntiaircraftGun

getAntiaircraftGun()

getAttributes

getAttributes()

getBattleBoardAmphibAssaultDetails

getBattleBoardAmphibAssaultDetails(roll,
                                   allowUnlanded)
Parameters:
roll - 

allowUnlanded - 


getBattleBoardDetails

getBattleBoardDetails(selectHits,
                      allowUnlanded,
                      firstStrike)
Parameters:
selectHits - 

allowUnlanded - 

firstStrike - 


getDefences

getDefences(ourOwn)
Parameters:
ourOwn - 


getIslands

getIslands()

getOverlayImageSrc

getOverlayImageSrc()

getShortestPathLength

getShortestPathLength(path,
                      territory,
                      target,
                      depth,
                      range)
Parameters:
path - 

territory - 

target - 

depth - 

range - 


getString

getString()

hasAntiaircraftGun

hasAntiaircraftGun()

hasIndustry

hasIndustry()

hasRoomForAircraft

hasRoomForAircraft(nonCombat,
                   isFighter)
Parameters:
nonCombat - 

isFighter - 


hasRoomForFighter

hasRoomForFighter(nonCombat)
Parameters:
nonCombat - 


hitString

hitString(hits,
          naval)
Parameters:
hits - 

naval - 


hitStringIndex

hitStringIndex()

holdingPower

holdingPower()

incrementUnitsManufactured

incrementUnitsManufactured()

isAmphibiousAssaulting

isAmphibiousAssaulting(territory)
Parameters:
territory - 


isBlitzedOrUnopposed

isBlitzedOrUnopposed()

isCanalTransitBlocked

isCanalTransitBlocked(toTerritory,
                      powerIndex)
Parameters:
toTerritory - 

powerIndex - 


isEnemy

isEnemy(powerIndex)
Parameters:
powerIndex - 


isEnemyOccupied

isEnemyOccupied(checkLandUnits,
                checkSeaUnits,
                checkAirUnits,
                checkStrategicBombUnits)
Parameters:
checkLandUnits - 

checkSeaUnits - 

checkAirUnits - 

checkStrategicBombUnits - 


isFriendly

isFriendly(powerIndex)
Parameters:
powerIndex - 


isFriendlyOccupied

isFriendlyOccupied(checkLandUnits,
                   checkSeaUnits,
                   checkAirUnits,
                   checkStrategicBombUnits)
Parameters:
checkLandUnits - 

checkSeaUnits - 

checkAirUnits - 

checkStrategicBombUnits - 


isHeld

isHeld()

isLand

isLand()

isNeutral

isNeutral()

isOccupied

isOccupied(powerIndex,
           checkLandUnits,
           checkSeaUnits,
           checkAirUnits,
           checkStrategicBombUnits)
Parameters:
powerIndex - 

checkLandUnits - 

checkSeaUnits - 

checkAirUnits - 

checkStrategicBombUnits - 


isSeaLocked

isSeaLocked()

isSeaZone

isSeaZone()

isStraitsTransitBlocked

isStraitsTransitBlocked(toTerritory,
                        powerIndex)
Parameters:
toTerritory - 

powerIndex - 


landPlane

landPlane(unit,
          team,
          toTerritory,
          unlanded)
Parameters:
unit - 

team - 

toTerritory - 

unlanded - 


landPlanesHtml

landPlanesHtml()

liberate

liberate(power,
         originalPower,
         logPhase)
Parameters:
power - 

originalPower - 

logPhase - 


logPowerIndex

logPowerIndex()

markDefenseOrderingNeeded

markDefenseOrderingNeeded()

maximumOutput

maximumOutput()

moveUnits

moveUnits(unit,
          team,
          toTerritory,
          num,
          oldSpacesMoved,
          newSpacesMoved,
          markAsMoved,
          aaGunFlyover,
          strategicBombingRaid,
          transport)
Parameters:
unit - 

team - 

toTerritory - 

num - 

oldSpacesMoved - 

newSpacesMoved - 

markAsMoved - 

aaGunFlyover - 

strategicBombingRaid - 

transport - 


needsCombatResolved

needsCombatResolved()

needsPlanesLanded

needsPlanesLanded()

neighboringPickup

neighboringPickup(transport,
                  powerIndex)
Parameters:
transport - 

powerIndex - 


neighboringPickups

neighboringPickups(transport,
                   powerIndex)
Parameters:
transport - 

powerIndex - 


nonCombatMovesHtml

nonCombatMovesHtml()

occupySeaZoneHtml

occupySeaZoneHtml()

orderCombatUnitsByCost

orderCombatUnitsByCost()

originalPower

originalPower()

preAmphibiousAssaultBattlesResolved

preAmphibiousAssaultBattlesResolved()

previewBattleBoard

previewBattleBoard()

processNonCombat

processNonCombat()

recordLandedPlanes

recordLandedPlanes(phase)
Parameters:
phase - 


recordUnitMovement

recordUnitMovement(phase)
Parameters:
phase - 


resolveAmphibiousCombatHtml

resolveAmphibiousCombatHtml()

retreat

retreat()

retreatDefensiveSubs

retreatDefensiveSubs(toTerritory)
Parameters:
toTerritory - 


retreatOptionsHtml

retreatOptionsHtml()

retreatTo

retreatTo(territory)
Parameters:
territory - 


selectHitStringIndex

selectHitStringIndex()

setAttribute

setAttribute(attributeString)
Parameters:
attributeString - 


setAttributes

setAttributes(attributesString)
Parameters:
attributesString - 


setDefenseOrderHtml

setDefenseOrderHtml()

setHoldingPower

setHoldingPower(powerIndex)
Parameters:
powerIndex - 


setString

setString(territoryString)
Parameters:
territoryString - 


shootDownSomePlanesHtml

shootDownSomePlanesHtml()

shortestPathLength

shortestPathLength(territory,
                   range)
Parameters:
territory - 

range - 


shotDownSomePlanesHtml

shotDownSomePlanesHtml()

shouldDefensiveSubsRetreat

shouldDefensiveSubsRetreat()

staticafyAmphibiousAssaultVessels

staticafyAmphibiousAssaultVessels()

strategicBombingRaidResolved

strategicBombingRaidResolved()

takeOverNeutralHtml

takeOverNeutralHtml()

trackHtml

trackHtml(point)
Parameters:
point - 


transportCounts

transportCounts(powerIndex,
                unmovedOnly,
                canCarryMoreOnly,
                allowFriendly)
Parameters:
powerIndex - 

unmovedOnly - 

canCarryMoreOnly - 

allowFriendly - 


unassignedUnitsOnTransports

unassignedUnitsOnTransports(attack)
Parameters:
attack - 


undestroyPlane

undestroyPlane(piece)
Parameters:
piece - 


undoAllLandings

undoAllLandings()

undoNonCombat

undoNonCombat()

unitAtNumber

unitAtNumber(unit,
             powerIndex,
             number)
Parameters:
unit - 

powerIndex - 

number - 


unitCount

unitCount(unit,
          powerIndex,
          unmovedOnly,
          notUsedInBattleOnly)
Parameters:
unit - 

powerIndex - 

unmovedOnly - 

notUsedInBattleOnly - 


unitString

unitString(units,
           naval)
Parameters:
units - 

naval - 


updateAmphibiousAssault

updateAmphibiousAssault()

updateAttackMoves

updateAttackMoves()

updateBlink

updateBlink()

updateColor

updateColor()

updateDefences

updateDefences(ourOwn)
Parameters:
ourOwn - 


updateNonCombatMoves

updateNonCombatMoves()

updateOrderStuff

updateOrderStuff()

updateRetreatTerritories

updateRetreatTerritories()