File: Games\WW2\Game.js

GamesByEmail
Class WW2Game

Object
  
 
 
GamesByEmail.Game
 
 
GamesByEmail.WW2Game

All Implemented Interfaces:

Class, Elemental, Resourceful, Server


GamesByEmail.WW2Game

extends Game

Constructor Summary
GamesByEmail.WW2Game()

Field Summary
static ObjectresourcePack
Resources for most of the game. Override to add resources specific to game.

Fields inherited from GamesByEmail.Game
board, canPie, constrainer, font, id, info, isLog, lastMove, logSettings, maxMoveNumber, message, move, notify, onLeftMouseDown, onLeftMouseUp, onMiddleMouseDown, onMiddleMouseUp, onMouseDown, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onRightMouseDown, onRightMouseUp, pieces, previewing, rotation, status, teams, territories, testing, title, type, verbose

Fields inherited from Foundation.Elemental
$Foundation_$registry_index

Method Summary
StringBuilderappendBoardHtml(/*StringBuilder*/ htmlBuilder)
Appends the HTML for the game board (usually an image) and the pieces or territories on it.
 areFriendly(powerIndex1, powerIndex2)
 arrowHtml(up)
 attackTerritory(point)
 backButton(inline)
 backButtonTag()
 blink()
 bombHtml(power)
 bounceMessages(startBounce)
 callOffAssault(territory)
 callOffAssaultAtIndex(tIndex)
 cancelGameButton()
 chooseCombatTerritoryHtml()
 chooseTerritoryToAttackHtml()
 cleanUpStrategicBombingRaid(territory)
 cleanUpStrategicBombingRaidAtIndex(tIndex)
 clearForNextTurn()
 clearMoves()
 closeSecondaryAttackAtIndex(tIndex)
 collectIncomeHtml()
 combatTerritory(point)
 combatUnitsOrderedAtIndex(tIndex)
 dieHtml(attacker, roll)
 displayOptions()
 dispose()
 doNothing()
 falseBackButton(id, arg)
 fillRocketAttackList(list, attackerIndex, targetIndex, range)
StringgameOverHtml()
Called when needing the game-over game prompts HTML. Override to set. Internally returns one of the following: theyResignedHtml, youResignedHtml, youTiedHtml, drawAcceptedHtml, youWinHtml or youLoseHtml.
 getDevelopmentString(team)
 getDevelopments()
 getNewGame2PlayerOrder(userInfo)
 getNewGame3PlayerOrder(userInfo)
 getNewGame4PlayerOrder(userInfo)
 getNewGame5PlayerOrder(userInfo)
ArraygetNewGamePlayerOrder(/*Array*/ userInfo)
Orders the players for the next game. By default the user information is reversed.
 getPieceImage(team, index)
 getRightLinksHtml()
 getRocketAttackInfo(team)
 getRollsString(rolls)
 getStateString()
 getString()
 getTeamString(team)
 getTeamsString()
 handleGameOver()
 hasLandPlanesOptions()
 hitPieceAtIndex(tIndex, pIndex)
voidinitialize(/*Number*/ numPlayers, /*Number*/ turnTeamIndex)
The first method to be called when a game is created, override to set up teams, players and the game state.
voidinitializeNewGameForm(/*GameForm*/ gameForm, /*Array*/ userInfo)
Seeds the game form options with values from the current game.
 initializePowers()
 isAllies(powerIndex)
 isAxis(powerIndex)
 landPlaneAtIndex(tIndex, oIndex, lIndex, cIndex)
 landPlanes(point)
 landPlanesPrompt(anyLeftToLand)
 loadAndMoveTransportAtIndex(tIndex, mIndex)
 logAAGunPhrase(numGuns)
 logAircraftPhrase(aircraftUnit, numAircraft)
 logBattleshipPhrase(numBattleships)
 logBombPhrase(numBombs)
 logBomberPhrase(numBombers)
 logFighterPhrase(numFighters)
 logHitPhrase(numHits)
 logIpcPhrase(numIpcs)
 logMovementButtons(needBackground)
 logRoll(roll)
 logRollString(rolls)
 logSpacePhrase(numSpaces)
 logSubmarinePhrase(numSubmarines)
 logUnitPhrase(numUnits)
 logWasPhrase(num)
 maybeEndTempHide(event)
 maybeStartTempHide(event)
 maybeSwitchPower()
 moveAllNumAvailAtIndex(tIndex, mIndex, pIndex)
 moveAllNumMovedAtIndex(tIndex, mIndex, pIndex)
 moveOneNumAvailAtIndex(tIndex, mIndex, pIndex)
 moveOneNumMovedAtIndex(tIndex, mIndex, pIndex)
 moveToNextTeamsTurn()
 moveTransportAtIndex(tIndex)
 newUnits()
 nextPhase(phase)
 nextPhaseButton(id, index, hidden)
 noCombatThisTurn()
 nonCombatMove(point)
 nonCombatMovesPrompt()
 notMyTurnHtml()
 notOurTurnButtons()
 numUnits(unit, delta)
 numUnitsPurchased(unit)
 openFaq(event)
 openFaqHtml()
 openMapEditor(mouseEvent)
 openTeamMessage(event)
 openTeamMessageHtml()
 openUnitSheet(event)
 openUnitSheetHtml()
 orderByCostButton()
 orderCombatUnitsByCostAtIndex(tIndex)
 orderRemainingByCost()
 placeNewUnitAtIndex(uIndex, pIndex)
 placeNewUnitsHtml()
 placePurchasedUnits()
 placePurchasedUnitsProcess()
 powerLogColor(powerIndex)
 powerTitleHtml(team, emptyTitles)
 previewBattleBoardAtIndex(tIndex)
 processGoBack()
 processNonCombatMoves()
 purchaseRowHtml(oddRow, power, unit)
 purchaseUnit(unit)
 purchaseUnits()
 purchaseUnitsHtml()
 removeHitPieces(territory, preBattle)
 removeHitPiecesAtIndex(tIndex)
 removePlaneHitsAtIndex(tIndex)
 researchDevelopmentHtml()
 researchResultsHtml()
voidresign()
Resignes the current player. Clears mouse events, sets the player as resigned, and sends the move.
 resignPower(team)
 resolveCombat(territory, amphibiousSet, mapClick)
 resolveCombatAmphibiousSetAtIndex(tIndex)
 resolveCombatAtIndex(tIndex)
 retreatAtIndex(tIndex)
 retreatToAtIndex(tIndex, rIndex)
 rocketAttack(territoryIndex)
 rocketAttackHtml()
 rocketAttackOdds()
 rocketAttackResultsHtml()
 rocketWithinRange(territories, attackerIndex, range)
 rollForCombat(territory)
 rollForCombatAtIndex(tIndex)
 rollForCombatAtIndex(tIndex)
 rollsByString(string)
BooleansendMove(/*Boolean*/ sendNow, /*Player*/ player)
Gets called when the Send Move button is pushed. Override and set the game state, then call Super.sendMove.
 setCompassRoseBlink(blink)
 setDefenseOrder(point)
 setDefenseOrderPrompt(anyLeftToOrder)
 setDevelopmentByString(team, string)
 setDisabled()
 setGamePrompts(html, track, compassHtml)
 setNextPhaseButtonHidden(hidden)
 setStateByString(string)
 setString(string, purchased)
 setTeamByString(team, string)
 setTeamsByString(string)
 setTrackPrompts(html, trackEvent)
 setWeaponsDevelopmentHtml(change)
 showBattleOdds(event)
voidshowTransactionPrompt(/*String*/ resourceName)
Shows the a tranaction message (Sending Move, Initializing, etc.).
 simpleTrackHtml()
 spendDevelopment(numChances)
 startAnotherGameButton()
 startTurn()
 startTurnHtml()
 staticBackButton(checkPhase)
 stopTrackPrompts()
voidsynch()
Called when the game should synchronize with info properties from the server.
 synchCombatLogHtml()
 teamCanAffordResearch(team)
 teamCanCollectIncome(team)
 teamCanManufacture(team)
 teamCanResearch(team)
 teamCanRocketAttack(team)
NumberteamColorFromTeam(/*Team*/ team)
Gets the team color.
 teamHasDevelopmentsLeft(team)
 teamHasMoves(team)
 teamHasPlayableCombatUnits(team)
 teamTitlesHtml(emptyTitles)
 toggleHitPiece(territory, pieceIndex)
 totalPurchaseCost()
 trackOnMouseDown(point)
 trackOnMouseMove(point, arg, event)
 trackOnMouseOut(point)
 unassignedUnitsOnTransports(attack)
 undoAllLandings()
 undoNonCombat()
 unitFromMusterIndex(muster)
 unitFromUnitIndex(unitIndex)
 unitPurchaseCost(unit)
 unlandPlaneAtIndex(tIndex, oIndex, lIndex, cIndex)
 unloadAllNumAvailAtIndex(tIndex, aIndex)
 unloadAllNumMovedAtIndex(tIndex, aIndex)
 unloadOneNumAvailAtIndex(tIndex, aIndex)
 unloadOneNumMovedAtIndex(tIndex, aIndex)
 unplaceNewUnitAtIndex(uIndex, pIndex)
 unpurchaseUnit(unitPurchaseChar)
 unpurchaseUnits()
voidupdate()
Updates the team titles, the game header, the game title, all prompts and action links.
 updateAttackMovesAtIndex(tIndex)
 updateCompassHilite(blinkOn)
 updateFurther(phaseIsNew)
 updateLogFurther()
 updateNonCombatMovesAtIndex(tIndex)
 updatePurchaseBoard()
 updatePurchaseRow(unit, total)
voidupdateTeamTitles()
Updates the top and bottom team title rows.
 verifyPurchase()
 weaponsDevelopmentHtml()

Methods inherited from GamesByEmail.Game
aboveTeamTitleRowHtml, acceptDeclineDrawHtml, acceptDraw, acceptDrawButtonHtml, addNote, addToPage, appendAdditionalPreferencesHtml, beginTurnHtml, belowTeamTitleRowHtml, boardPointFromScreenPoint, boardPointFromScreenXY, boardPointFromValueIndex, boardValueFromValueColor, cancelGameButtonHtml, cancelGameHtml, checkMove, clearHilites, clearMouseEvents, closeWindowButtonHtml, closeWindowHtml, colorFromBoardValue, colorFromPointBoard, colorFromXYBoard, completeTurnHtml, completeYourTurnHtml, constrainPoint, constrainRectangle, continueTurnHtml, continueYourTurnHtml, debug, diceRolls, dieRoll, drawAcceptedHeaderHtml, drawAcceptedHtml, drawDeclinedHeaderHtml, drawDeclinedHtml, drawOfferedHeaderHtml, elementTitleAttributes, findNextPlayer, findPlayer, findWinningTeam, forEachBoardPoint, forEachTeam, gameInProgressHeaderHtml, gameOverHeaderHtml, getActionLinksHtml, getAnchorHtml, getButtonHtml, getCheckboxHtml, getGamePromptsHtml, getHeaderHtml, getHtml, getHtmlButtonHtml, getImageSrc, getNextGamesTitle, getOptionHtml, getPieType, getPieceRect, getPieceSrc, getRadioHtml, getSelectHtml, getSpectatorAnchorHtml, getSpectatorUrl, getTeamAtDistance, getTeamFontColor, getTeamLogFontBgColor, getTeamLogFontColor, getTeamTitleAlignment, getTeamTitleHtml, getTeamTitlesHtml, getTeamsForTitles, getTextHtml, getTextareaHtml, getTurnHtml, getTurnTeam, getVButtonHtml, handleMoveCollision, hiliteImageHtml, isBoardPointHidden, isColorAtPoint, isColorAtXY, isMyTurn, isPathClear, isPointBoardClear, isPointOnBoard, isValueColorAtPoint, isValueColorAtXY, isXYBoardClear, isXYOnBoard, itsYourTurnHtml, maybePie, maybeResign, movePiece, nextTeam, notYourTurnHtml, numInPath, numTeamsPlaying, offerDrawCheckBoxHtml, offerDrawHtml, openLogAnchorHtml, openPlayerChatAnchorHtml, openPreferencesAnchorHtml, openRulesAnchorHtml, pie, pieButtonHtml, pieHtml, processSecureMove, refreshGame, refreshGameButtonHtml, reportProblemAnchorHtml, resignButtonHtml, resignHtml, resignedHeaderHtml, screenRectFromBoardPoint, screenRectFromBoardXY, sendMoveButtonHtml, sendMoveHtml, sendReminderButtonHtml, setConstrainer, setEnded, setFloatHtml, setInnerHtml, setMouseHtml, setPerspective, setPlayerPrefs, setValueAtPoint, setValueAtXY, spectatingHtml, startAnotherGameButtonHtml, startAnotherGameHtml, synchTeam, theyResignedHtml, tieGameHeaderHtml, titleFromTeamColor, transformHashLinksToOnClicks, turnHeaderHtml, undo, undoButtonHtml, undoMoveHtml, valueFromBoardValue, valueFromPointBoard, valueFromXYBoard, valueIndexFromBoardPoint, valueIndexFromBoardXY, wonHeaderHtml, youLoseHtml, youResignedHtml, youTiedHtml, youWinHtml

Methods inherited from Foundation.Class
getTypePath, isInstanceOf

Methods inherited from Foundation.Elemental
attachEvent, detachEvent, elementId, event, getById, getElement, getElementValue, getElements, getFirst, getNext, parseElementId, processHtml, processHtml

Methods inherited from Foundation.Resourceful
resource, resource, resourceUrl, resourceUrl

Methods inherited from Foundation.Server
server, serverSerialized, serverSynchronous

Constructor Detail

WW2Game

GamesByEmail.WW2Game()

Field Detail

resourcePack

static Object resourcePack

Resources for most of the game. Override to add resources specific to game.

Overrides:
resourcePack in class Game
See Also:
Foundation.Resourceful.resource

Method Detail

appendBoardHtml

StringBuilder appendBoardHtml(/*StringBuilder*/ htmlBuilder)

Appends the HTML for the game board (usually an image) and the pieces or territories on it.

Overrides:
appendBoardHtml in class Game
Parameters:
htmlBuilder - 
The builder to append the HTML for the board.
Returns:
The HTML builder passed in.

areFriendly

areFriendly(powerIndex1,
            powerIndex2)
Parameters:
powerIndex1 - 

powerIndex2 - 


arrowHtml

arrowHtml(up)
Parameters:
up - 


attackTerritory

attackTerritory(point)
Parameters:
point - 


backButton

backButton(inline)
Parameters:
inline - 


backButtonTag

backButtonTag()

blink

blink()

bombHtml

bombHtml(power)
Parameters:
power - 


bounceMessages

bounceMessages(startBounce)
Parameters:
startBounce - 


callOffAssault

callOffAssault(territory)
Parameters:
territory - 


callOffAssaultAtIndex

callOffAssaultAtIndex(tIndex)
Parameters:
tIndex - 


cancelGameButton

cancelGameButton()

chooseCombatTerritoryHtml

chooseCombatTerritoryHtml()

chooseTerritoryToAttackHtml

chooseTerritoryToAttackHtml()

cleanUpStrategicBombingRaid

cleanUpStrategicBombingRaid(territory)
Parameters:
territory - 


cleanUpStrategicBombingRaidAtIndex

cleanUpStrategicBombingRaidAtIndex(tIndex)
Parameters:
tIndex - 


clearForNextTurn

clearForNextTurn()

clearMoves

clearMoves()

closeSecondaryAttackAtIndex

closeSecondaryAttackAtIndex(tIndex)
Parameters:
tIndex - 


collectIncomeHtml

collectIncomeHtml()

combatTerritory

combatTerritory(point)
Parameters:
point - 


combatUnitsOrderedAtIndex

combatUnitsOrderedAtIndex(tIndex)
Parameters:
tIndex - 


dieHtml

dieHtml(attacker,
        roll)
Parameters:
attacker - 

roll - 


displayOptions

displayOptions()

dispose

dispose()
Overrides:
dispose in class Game

doNothing

doNothing()

falseBackButton

falseBackButton(id,
                arg)
Parameters:
id - 

arg - 


fillRocketAttackList

fillRocketAttackList(list,
                     attackerIndex,
                     targetIndex,
                     range)
Parameters:
list - 

attackerIndex - 

targetIndex - 

range - 


gameOverHtml

String gameOverHtml()

Called when needing the game-over game prompts HTML. Override to set. Internally returns one of the following: theyResignedHtml, youResignedHtml, youTiedHtml, drawAcceptedHtml, youWinHtml or youLoseHtml.

Overrides:
gameOverHtml in class Game
Returns:
HTML for the game prompts.

getDevelopmentString

getDevelopmentString(team)
Parameters:
team - 


getDevelopments

getDevelopments()

getNewGame2PlayerOrder

getNewGame2PlayerOrder(userInfo)
Parameters:
userInfo - 


getNewGame3PlayerOrder

getNewGame3PlayerOrder(userInfo)
Parameters:
userInfo - 


getNewGame4PlayerOrder

getNewGame4PlayerOrder(userInfo)
Parameters:
userInfo - 


getNewGame5PlayerOrder

getNewGame5PlayerOrder(userInfo)
Parameters:
userInfo - 


getNewGamePlayerOrder

Array getNewGamePlayerOrder(/*Array*/ userInfo)

Orders the players for the next game. By default the user information is reversed.

Overrides:
getNewGamePlayerOrder in class Game
Parameters:
userInfo - 
An array of user information as currently in this game.
Returns:
An array of user information.

getPieceImage

getPieceImage(team,
              index)
Parameters:
team - 

index - 


getRightLinksHtml

getRightLinksHtml()

getRocketAttackInfo

getRocketAttackInfo(team)
Parameters:
team - 


getRollsString

getRollsString(rolls)
Parameters:
rolls - 


getStateString

getStateString()

getString

getString()

getTeamString

getTeamString(team)
Parameters:
team - 


getTeamsString

getTeamsString()

handleGameOver

handleGameOver()

hasLandPlanesOptions

hasLandPlanesOptions()

hitPieceAtIndex

hitPieceAtIndex(tIndex,
                pIndex)
Parameters:
tIndex - 

pIndex - 


initialize

void initialize(/*Number*/ numPlayers,
                /*Number*/ turnTeamIndex)

The first method to be called when a game is created, override to set up teams, players and the game state.

Overrides:
initialize in class Game
Parameters:
numPlayers - 
The number of players from the game form.
turnTeamIndex - 
The index of the team to set the initial turn. Call the Super with -1 to set all teams turn.

Example:

// Override initialize
   initialize:function(numPlayers,turnTeamIndex)
   {
      // Call the Super.initialize to add default teams.
      Super.initialize(numPlayers,turnTeamIndex);
 
      // Initialize the board state.
      this.info["board"]="rnbqkbnrpppppppp                                PPPPPPPPRNBQKBNR";
      var team=this.teams[0];
      team.info["i_ep"]=-1;
      team.info["b_cs"]=true;
      team.info["b_cl"]=true;
      team=this.teams[1];
      team.info["i_ep"]=-1;
      team.info["b_cs"]=true;
      team.info["b_cl"]=true;
      
      // Log the start of game.
      this.move.log=this.logEntry(44);
   }

initializeNewGameForm

void initializeNewGameForm(/*GameForm*/ gameForm,
                           /*Array*/ userInfo)

Seeds the game form options with values from the current game.

Overrides:
initializeNewGameForm in class Game
Parameters:
gameForm - 
The game form to seed.
userInfo - 
An array of user information.

initializePowers

initializePowers()

isAllies

isAllies(powerIndex)
Parameters:
powerIndex - 


isAxis

isAxis(powerIndex)
Parameters:
powerIndex - 


landPlaneAtIndex

landPlaneAtIndex(tIndex,
                 oIndex,
                 lIndex,
                 cIndex)
Parameters:
tIndex - 

oIndex - 

lIndex - 

cIndex - 


landPlanes

landPlanes(point)
Parameters:
point - 


landPlanesPrompt

landPlanesPrompt(anyLeftToLand)
Parameters:
anyLeftToLand - 


loadAndMoveTransportAtIndex

loadAndMoveTransportAtIndex(tIndex,
                            mIndex)
Parameters:
tIndex - 

mIndex - 


logAAGunPhrase

logAAGunPhrase(numGuns)
Parameters:
numGuns - 


logAircraftPhrase

logAircraftPhrase(aircraftUnit,
                  numAircraft)
Parameters:
aircraftUnit - 

numAircraft - 


logBattleshipPhrase

logBattleshipPhrase(numBattleships)
Parameters:
numBattleships - 


logBombPhrase

logBombPhrase(numBombs)
Parameters:
numBombs - 


logBomberPhrase

logBomberPhrase(numBombers)
Parameters:
numBombers - 


logFighterPhrase

logFighterPhrase(numFighters)
Parameters:
numFighters - 


logHitPhrase

logHitPhrase(numHits)
Parameters:
numHits - 


logIpcPhrase

logIpcPhrase(numIpcs)
Parameters:
numIpcs - 


logMovementButtons

logMovementButtons(needBackground)
Parameters:
needBackground - 


logRoll

logRoll(roll)
Parameters:
roll - 


logRollString

logRollString(rolls)
Parameters:
rolls - 


logSpacePhrase

logSpacePhrase(numSpaces)
Parameters:
numSpaces - 


logSubmarinePhrase

logSubmarinePhrase(numSubmarines)
Parameters:
numSubmarines - 


logUnitPhrase

logUnitPhrase(numUnits)
Parameters:
numUnits - 


logWasPhrase

logWasPhrase(num)
Parameters:
num - 


maybeEndTempHide

maybeEndTempHide(event)
Parameters:
event - 


maybeStartTempHide

maybeStartTempHide(event)
Parameters:
event - 


maybeSwitchPower

maybeSwitchPower()

moveAllNumAvailAtIndex

moveAllNumAvailAtIndex(tIndex,
                       mIndex,
                       pIndex)
Parameters:
tIndex - 

mIndex - 

pIndex - 


moveAllNumMovedAtIndex

moveAllNumMovedAtIndex(tIndex,
                       mIndex,
                       pIndex)
Parameters:
tIndex - 

mIndex - 

pIndex - 


moveOneNumAvailAtIndex

moveOneNumAvailAtIndex(tIndex,
                       mIndex,
                       pIndex)
Parameters:
tIndex - 

mIndex - 

pIndex - 


moveOneNumMovedAtIndex

moveOneNumMovedAtIndex(tIndex,
                       mIndex,
                       pIndex)
Parameters:
tIndex - 

mIndex - 

pIndex - 


moveToNextTeamsTurn

moveToNextTeamsTurn()

moveTransportAtIndex

moveTransportAtIndex(tIndex)
Parameters:
tIndex - 


newUnits

newUnits()

nextPhase

nextPhase(phase)
Parameters:
phase - 


nextPhaseButton

nextPhaseButton(id,
                index,
                hidden)
Parameters:
id - 

index - 

hidden - 


noCombatThisTurn

noCombatThisTurn()

nonCombatMove

nonCombatMove(point)
Parameters:
point - 


nonCombatMovesPrompt

nonCombatMovesPrompt()

notMyTurnHtml

notMyTurnHtml()

notOurTurnButtons

notOurTurnButtons()

numUnits

numUnits(unit,
         delta)
Parameters:
unit - 

delta - 


numUnitsPurchased

numUnitsPurchased(unit)
Parameters:
unit - 


openFaq

openFaq(event)
Parameters:
event - 


openFaqHtml

openFaqHtml()

openMapEditor

openMapEditor(mouseEvent)
Parameters:
mouseEvent - 


openTeamMessage

openTeamMessage(event)
Parameters:
event - 


openTeamMessageHtml

openTeamMessageHtml()

openUnitSheet

openUnitSheet(event)
Parameters:
event - 


openUnitSheetHtml

openUnitSheetHtml()

orderByCostButton

orderByCostButton()

orderCombatUnitsByCostAtIndex

orderCombatUnitsByCostAtIndex(tIndex)
Parameters:
tIndex - 


orderRemainingByCost

orderRemainingByCost()

placeNewUnitAtIndex

placeNewUnitAtIndex(uIndex,
                    pIndex)
Parameters:
uIndex - 

pIndex - 


placeNewUnitsHtml

placeNewUnitsHtml()

placePurchasedUnits

placePurchasedUnits()

placePurchasedUnitsProcess

placePurchasedUnitsProcess()

powerLogColor

powerLogColor(powerIndex)
Parameters:
powerIndex - 


powerTitleHtml

powerTitleHtml(team,
               emptyTitles)
Parameters:
team - 

emptyTitles - 


previewBattleBoardAtIndex

previewBattleBoardAtIndex(tIndex)
Parameters:
tIndex - 


processGoBack

processGoBack()

processNonCombatMoves

processNonCombatMoves()

purchaseRowHtml

purchaseRowHtml(oddRow,
                power,
                unit)
Parameters:
oddRow - 

power - 

unit - 


purchaseUnit

purchaseUnit(unit)
Parameters:
unit - 


purchaseUnits

purchaseUnits()

purchaseUnitsHtml

purchaseUnitsHtml()

removeHitPieces

removeHitPieces(territory,
                preBattle)
Parameters:
territory - 

preBattle - 


removeHitPiecesAtIndex

removeHitPiecesAtIndex(tIndex)
Parameters:
tIndex - 


removePlaneHitsAtIndex

removePlaneHitsAtIndex(tIndex)
Parameters:
tIndex - 


researchDevelopmentHtml

researchDevelopmentHtml()

researchResultsHtml

researchResultsHtml()

resign

void resign()

Resignes the current player. Clears mouse events, sets the player as resigned, and sends the move.

Overrides:
resign in class Game

resignPower

resignPower(team)
Parameters:
team - 


resolveCombat

resolveCombat(territory,
              amphibiousSet,
              mapClick)
Parameters:
territory - 

amphibiousSet - 

mapClick - 


resolveCombatAmphibiousSetAtIndex

resolveCombatAmphibiousSetAtIndex(tIndex)
Parameters:
tIndex - 


resolveCombatAtIndex

resolveCombatAtIndex(tIndex)
Parameters:
tIndex - 


retreatAtIndex

retreatAtIndex(tIndex)
Parameters:
tIndex - 


retreatToAtIndex

retreatToAtIndex(tIndex,
                 rIndex)
Parameters:
tIndex - 

rIndex - 


rocketAttack

rocketAttack(territoryIndex)
Parameters:
territoryIndex - 


rocketAttackHtml

rocketAttackHtml()

rocketAttackOdds

rocketAttackOdds()

rocketAttackResultsHtml

rocketAttackResultsHtml()

rocketWithinRange

rocketWithinRange(territories,
                  attackerIndex,
                  range)
Parameters:
territories - 

attackerIndex - 

range - 


rollForCombat

rollForCombat(territory)
Parameters:
territory - 


rollForCombatAtIndex

rollForCombatAtIndex(tIndex)
Parameters:
tIndex - 


rollForCombatAtIndex

rollForCombatAtIndex(tIndex)
Parameters:
tIndex - 


rollsByString

rollsByString(string)
Parameters:
string - 


sendMove

Boolean sendMove(/*Boolean*/ sendNow,
                 /*Player*/ player)

Gets called when the Send Move button is pushed. Override and set the game state, then call Super.sendMove.

Overrides:
sendMove in class Game
Parameters:
sendNow - 
(Optional) Send the moves to the server now. Else, save the move for sending later. Defaults to true.
player - 
(Optional) The player responsible for the move. Defaults to the current player (game.player).
Returns:
true.

setCompassRoseBlink

setCompassRoseBlink(blink)
Parameters:
blink - 


setDefenseOrder

setDefenseOrder(point)
Parameters:
point - 


setDefenseOrderPrompt

setDefenseOrderPrompt(anyLeftToOrder)
Parameters:
anyLeftToOrder - 


setDevelopmentByString

setDevelopmentByString(team,
                       string)
Parameters:
team - 

string - 


setDisabled

setDisabled()

setGamePrompts

setGamePrompts(html,
               track,
               compassHtml)
Parameters:
html - 

track - 

compassHtml - 


setNextPhaseButtonHidden

setNextPhaseButtonHidden(hidden)
Parameters:
hidden - 


setStateByString

setStateByString(string)
Parameters:
string - 


setString

setString(string,
          purchased)
Parameters:
string - 

purchased - 


setTeamByString

setTeamByString(team,
                string)
Parameters:
team - 

string - 


setTeamsByString

setTeamsByString(string)
Parameters:
string - 


setTrackPrompts

setTrackPrompts(html,
                trackEvent)
Parameters:
html - 

trackEvent - 


setWeaponsDevelopmentHtml

setWeaponsDevelopmentHtml(change)
Parameters:
change - 


showBattleOdds

showBattleOdds(event)
Parameters:
event - 


showTransactionPrompt

void showTransactionPrompt(/*String*/ resourceName)

Shows the a tranaction message (Sending Move, Initializing, etc.).

Overrides:
showTransactionPrompt in class Game
Parameters:
resourceName - 
The resource to display.

simpleTrackHtml

simpleTrackHtml()

spendDevelopment

spendDevelopment(numChances)
Parameters:
numChances - 


startAnotherGameButton

startAnotherGameButton()

startTurn

startTurn()

startTurnHtml

startTurnHtml()

staticBackButton

staticBackButton(checkPhase)
Parameters:
checkPhase - 


stopTrackPrompts

stopTrackPrompts()

synch

void synch()

Called when the game should synchronize with info properties from the server.

Overrides:
synch in class Game
Notes:
The game should set tangible properties or states for each custom property set in the info collection. The info collection should not be referenced outside the scope of the synch or sendMove methods.

synchCombatLogHtml

synchCombatLogHtml()

teamCanAffordResearch

teamCanAffordResearch(team)
Parameters:
team - 


teamCanCollectIncome

teamCanCollectIncome(team)
Parameters:
team - 


teamCanManufacture

teamCanManufacture(team)
Parameters:
team - 


teamCanResearch

teamCanResearch(team)
Parameters:
team - 


teamCanRocketAttack

teamCanRocketAttack(team)
Parameters:
team - 


teamColorFromTeam

Number teamColorFromTeam(/*Team*/ team)

Gets the team color.

Overrides:
teamColorFromTeam in class Game
Parameters:
team - 
The team to get the color of.
Returns:
The team color.

teamHasDevelopmentsLeft

teamHasDevelopmentsLeft(team)
Parameters:
team - 


teamHasMoves

teamHasMoves(team)
Parameters:
team - 


teamHasPlayableCombatUnits

teamHasPlayableCombatUnits(team)
Parameters:
team - 


teamTitlesHtml

teamTitlesHtml(emptyTitles)
Parameters:
emptyTitles - 


toggleHitPiece

toggleHitPiece(territory,
               pieceIndex)
Parameters:
territory - 

pieceIndex - 


totalPurchaseCost

totalPurchaseCost()

trackOnMouseDown

trackOnMouseDown(point)
Parameters:
point - 


trackOnMouseMove

trackOnMouseMove(point,
                 arg,
                 event)
Parameters:
point - 

arg - 

event - 


trackOnMouseOut

trackOnMouseOut(point)
Parameters:
point - 


unassignedUnitsOnTransports

unassignedUnitsOnTransports(attack)
Parameters:
attack - 


undoAllLandings

undoAllLandings()

undoNonCombat

undoNonCombat()

unitFromMusterIndex

unitFromMusterIndex(muster)
Parameters:
muster - 


unitFromUnitIndex

unitFromUnitIndex(unitIndex)
Parameters:
unitIndex - 


unitPurchaseCost

unitPurchaseCost(unit)
Parameters:
unit - 


unlandPlaneAtIndex

unlandPlaneAtIndex(tIndex,
                   oIndex,
                   lIndex,
                   cIndex)
Parameters:
tIndex - 

oIndex - 

lIndex - 

cIndex - 


unloadAllNumAvailAtIndex

unloadAllNumAvailAtIndex(tIndex,
                         aIndex)
Parameters:
tIndex - 

aIndex - 


unloadAllNumMovedAtIndex

unloadAllNumMovedAtIndex(tIndex,
                         aIndex)
Parameters:
tIndex - 

aIndex - 


unloadOneNumAvailAtIndex

unloadOneNumAvailAtIndex(tIndex,
                         aIndex)
Parameters:
tIndex - 

aIndex - 


unloadOneNumMovedAtIndex

unloadOneNumMovedAtIndex(tIndex,
                         aIndex)
Parameters:
tIndex - 

aIndex - 


unplaceNewUnitAtIndex

unplaceNewUnitAtIndex(uIndex,
                      pIndex)
Parameters:
uIndex - 

pIndex - 


unpurchaseUnit

unpurchaseUnit(unitPurchaseChar)
Parameters:
unitPurchaseChar - 


unpurchaseUnits

unpurchaseUnits()

update

void update()

Updates the team titles, the game header, the game title, all prompts and action links.

Overrides:
update in class Game

updateAttackMovesAtIndex

updateAttackMovesAtIndex(tIndex)
Parameters:
tIndex - 


updateCompassHilite

updateCompassHilite(blinkOn)
Parameters:
blinkOn - 


updateFurther

updateFurther(phaseIsNew)
Parameters:
phaseIsNew - 


updateLogFurther

updateLogFurther()

updateNonCombatMovesAtIndex

updateNonCombatMovesAtIndex(tIndex)
Parameters:
tIndex - 


updatePurchaseBoard

updatePurchaseBoard()

updatePurchaseRow

updatePurchaseRow(unit,
                  total)
Parameters:
unit - 

total - 


updateTeamTitles

void updateTeamTitles()

Updates the top and bottom team title rows.

Overrides:
updateTeamTitles in class Game

verifyPurchase

verifyPurchase()

weaponsDevelopmentHtml

weaponsDevelopmentHtml()