File: Games\Gambit\Game.js

GamesByEmail
Class GambitGame

Object
  
 
 
GamesByEmail.Game
 
 
GamesByEmail.GambitGame

All Implemented Interfaces:

Class, Elemental, Resourceful, Server


GamesByEmail.GambitGame

extends Game

Constructor Summary
GamesByEmail.GambitGame()

Constant Summary
static  MAX_ARMY_SIZE

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
StringBuilderappendAdditionalPreferencesHtml(/*StringBuilder*/ htmlBuilder)
Override to add additional player preferences.
 attackButtonClick(attackers)
 attackClearTimer()
 attackFromChange(index, noOnBoard)
 attackHtml()
 attackOrFortifyClick(point)
 attackToChange(index)
 battleOddsAnchorHtml()
StringbelowTeamTitleRowHtml(/*Number*/ numCols)
Gets any HTML for an information row to be displayed below the bottom team titles.
 buttonContrast(color)
 calcTradeInValue(cards)
 canLogPeek(endStatus)
 canMove(moveData, color)
 canPeek()
 canTradeSet()
 captureAllButtonClicked()
 captureButtonClicked()
 captureHtml()
 captureIncrementButtonClick(reverse, moveAll)
 captureMaxAnchorClicked()
 cardLogTitle(index)
 cardTableHtml()
 checkDirection(moveData, point, step, color)
BooleancheckMove(/*Point*/ toPoint, /*Point*/ fromPoint)
Checks to see if a move is legal. By default calls isMoveLegal.
 colorFromValueChars(cc1, cc2)
StringcompleteYourTurnHtml(/*String*/ resourceName)
Called when needing the complete-your-turn game prompt HTML (typically a short sentence about the move and a Send This Move button). Override and set mouse events here. Internally uses the "completeYourTurn" resource.
StringcontinueYourTurnHtml(/*String*/ resourceName)
Called when needing the continue-your-turn game prompt HTML (typically a short sentence about the move, no send move button yet). Override and set mouse events here. Internally uses the "continueYourTurn" resource.
 deployMaxAnchorClicked()
 deployRegularArmy(point)
 deploymentSizeHtml()
 deploymentSummaryHtml()
 diceHtml()
 dispose()
 done1ButtonClicked()
 done1Html()
 doneButtonClicked(force)
 doneHtml()
 explainAirStrikesAnchorClicked()
 fortifyButtonClick()
 fortifyFromChange(index)
 fortifyHtml()
 fortifyIncrementButtonClick(reverse, moveAll)
 fortifyMaxAnchorClicked()
 fortifyToChange(index)
 gambitColorResource(resourceName, color)
 gameAndTradeInfoString()
 gamePhaseFromSetup(setup)
StringgetActionLinksHtml()
Creates HTML for a action links: Open log, open rules, open preferences, and report problem anchors.
 getArmyDeploymentSize()
 getArmyString(armies, armyType, capitol)
 getAttackButtons(small)
 getCaptureButtons(small)
 getFortifyButtons(small)
 getImageSrcByColors(key)
 getNearestOnBoardPoint(point)
ArraygetNewGamePlayerOrder(/*Array*/ userInfo)
Orders the players for the next game. By default the user information is reversed.
 getOnBoardAttackHtml(point)
 getOnBoardCaptureHtml(point)
 getOnBoardFortifyHtml(point)
 getRandomBoard(numPlayers, setup)
 getShuffledDeck()
StringgetTeamTitleHtml(/*Team*/ team, /*Boolean*/ top)
Gets the HTML for the team title on the board. By default uses resources 'turnTeamTitle' or 'teamTitle'.
 getTerritoriesString(territories)
 hideOnBoardControls()
 highContrast(color)
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.
 isMoveLegal(point, moveData, color)
StringitsYourTurnHtml(/*String*/ resourceName)
Called when needing the it-is-your-turn game prompt HTML (typically a short sentence about the move). Override and set mouse events here. Internally uses the "itIsYourTurnToMove" resource.
 itsYourTurnNowPlaying()
 itsYourTurnPickTerritories()
 itsYourTurnPopulateTerritories()
 maybeCardTableHtml(numCols)
 maybeShowArrow(fromIndex, toIndex)
 mouseDown(screenPoint)
 mouseMove(screenPoint)
StringnotYourTurnHtml(/*String*/ resourceName)
Called when needing the it-is-not-your-turn game prompt HTML (typically a short sentence with Send Reminder, Refresh Game and Close Window buttons Start Another Game button). Override to set. Internally uses the "notYourTurn" resource.
 numberFromValueChars(cc1, cc2)
 occupyingArmiesButtonClicked(territoryIndex)
 occupyingArmiesDeployerHtml()
StringofferDrawHtml(/*String*/ resourceName)
Called when needing the offer-a-draw-with-this-move prompts HTML (typically a short sentence and a Offer A Draw checkbox). Override to set. Internally uses the "youMayOfferDraw" and "offerDrawWithThisMove" resources.
 onBoardDoneButtonHtml()
 openOddsAnchorClicked(screenX, screenY)
 openStatistics(event)
 openStatisticsAnchorHtml()
 pieceColorBgName(color)
 pieceColorFgName(color)
 processOldLogMove(move, moveIndex, logIngredients)
 readyToAttack()
 readyToFortify()
 regularArmiesDeployerHtml()
voidresign()
Resignes the current player. Clears mouse events, sets the player as resigned, and sends the move.
 roll(attackers, defenders, rollCacheSize)
 rollCacheSize(numAttackers, numDefenders)
 rollLog(entry, startIndex, diceSeperator)
 selectCard(cardIndex)
BooleansendMove(/*Boolean*/ sendNow, /*Player*/ player)
Gets called when the Send Move button is pushed. Override and set the game state, then call Super.sendMove.
 setArmyDeploymentSize(size)
 setHtml()
voidsetPlayerPrefs()
Extract the player's preferences from the player.info collection, and sets properties accordingly. By default, the font and verbose properties are extracted.
 setTeamLog(team)
 showOnBoardAttack()
 showOnBoardCapture()
 showOnBoardFortify()
 showOnBoardOccupyingDeployer()
 spyButtonClick(defenderColor)
 spyHtml()
voidsynch()
Called when the game should synchronize with info properties from the server.
voidsynchTeam(/*Team*/ team)
Called to synchronize the team properties with the raw team data. Just the color and title properties are set by default, override to set more.
 titleArmyWorth(team)
 tournamentHtml()
 tradeButtonClicked()
 tradeInCards()
 undisableTradeButtons()
voidupdate()
Updates the team titles, the game header, the game title, all prompts and action links.
 valueCharsFromColorNumber(color, num)

Methods inherited from GamesByEmail.Game
aboveTeamTitleRowHtml, acceptDeclineDrawHtml, acceptDraw, acceptDrawButtonHtml, addNote, addToPage, appendBoardHtml, beginTurnHtml, boardPointFromScreenPoint, boardPointFromScreenXY, boardPointFromValueIndex, boardValueFromValueColor, cancelGameButtonHtml, cancelGameHtml, clearHilites, clearMouseEvents, closeWindowButtonHtml, closeWindowHtml, colorFromBoardValue, colorFromPointBoard, colorFromXYBoard, completeTurnHtml, constrainPoint, constrainRectangle, continueTurnHtml, debug, diceRolls, dieRoll, drawAcceptedHeaderHtml, drawAcceptedHtml, drawDeclinedHeaderHtml, drawDeclinedHtml, drawOfferedHeaderHtml, elementTitleAttributes, findNextPlayer, findPlayer, findWinningTeam, forEachBoardPoint, forEachTeam, gameInProgressHeaderHtml, gameOverHeaderHtml, gameOverHtml, getAnchorHtml, getButtonHtml, getCheckboxHtml, getGamePromptsHtml, getHeaderHtml, getHtml, getHtmlButtonHtml, getImageSrc, getNextGamesTitle, getOptionHtml, getPieType, getPieceRect, getPieceSrc, getRadioHtml, getSelectHtml, getSpectatorAnchorHtml, getSpectatorUrl, getTeamAtDistance, getTeamFontColor, getTeamLogFontBgColor, getTeamLogFontColor, getTeamTitleAlignment, getTeamTitlesHtml, getTeamsForTitles, getTextHtml, getTextareaHtml, getTurnHtml, getTurnTeam, getVButtonHtml, handleMoveCollision, hiliteImageHtml, isBoardPointHidden, isColorAtPoint, isColorAtXY, isMyTurn, isPathClear, isPointBoardClear, isPointOnBoard, isValueColorAtPoint, isValueColorAtXY, isXYBoardClear, isXYOnBoard, maybePie, maybeResign, movePiece, nextTeam, numInPath, numTeamsPlaying, offerDrawCheckBoxHtml, 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, setValueAtPoint, setValueAtXY, showTransactionPrompt, spectatingHtml, startAnotherGameButtonHtml, startAnotherGameHtml, teamColorFromTeam, theyResignedHtml, tieGameHeaderHtml, titleFromTeamColor, transformHashLinksToOnClicks, turnHeaderHtml, undo, undoButtonHtml, undoMoveHtml, updateTeamTitles, 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

GambitGame

GamesByEmail.GambitGame()

Constant Detail

MAX_ARMY_SIZE

static MAX_ARMY_SIZE

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

appendAdditionalPreferencesHtml

StringBuilder appendAdditionalPreferencesHtml(/*StringBuilder*/ htmlBuilder)

Override to add additional player preferences.

Overrides:
appendAdditionalPreferencesHtml in class Game
Parameters:
htmlBuilder - 
The string builder to add the extra player preference HTML to.
Returns:
The string builder.

attackButtonClick

attackButtonClick(attackers)
Parameters:
attackers - 


attackClearTimer

attackClearTimer()

attackFromChange

attackFromChange(index,
                 noOnBoard)
Parameters:
index - 

noOnBoard - 


attackHtml

attackHtml()

attackOrFortifyClick

attackOrFortifyClick(point)
Parameters:
point - 


attackToChange

attackToChange(index)
Parameters:
index - 


battleOddsAnchorHtml

battleOddsAnchorHtml()

belowTeamTitleRowHtml

String belowTeamTitleRowHtml(/*Number*/ numCols)

Gets any HTML for an information row to be displayed below the bottom team titles.

Overrides:
belowTeamTitleRowHtml in class Game
Parameters:
numCols - 
The number of columns of the table the row will belong in, set colspan accordingly.
Returns:
By default returns empty. Override and return '...' to add information.

buttonContrast

buttonContrast(color)
Parameters:
color - 


calcTradeInValue

calcTradeInValue(cards)
Parameters:
cards - 


canLogPeek

canLogPeek(endStatus)
Parameters:
endStatus - 


canMove

canMove(moveData,
        color)
Parameters:
moveData - 

color - 


canPeek

canPeek()

canTradeSet

canTradeSet()

captureAllButtonClicked

captureAllButtonClicked()

captureButtonClicked

captureButtonClicked()

captureHtml

captureHtml()

captureIncrementButtonClick

captureIncrementButtonClick(reverse,
                            moveAll)
Parameters:
reverse - 

moveAll - 


captureMaxAnchorClicked

captureMaxAnchorClicked()

cardLogTitle

cardLogTitle(index)
Parameters:
index - 


cardTableHtml

cardTableHtml()

checkDirection

checkDirection(moveData,
               point,
               step,
               color)
Parameters:
moveData - 

point - 

step - 

color - 


checkMove

Boolean checkMove(/*Point*/ toPoint,
                  /*Point*/ fromPoint)

Checks to see if a move is legal. By default calls isMoveLegal.

Overrides:
checkMove in class Game
Parameters:
toPoint - 
The board point moving to.
fromPoint - 
The board point moving from.
Returns:
true if the move is legal.
See Also:
isMoveLegal

colorFromValueChars

colorFromValueChars(cc1,
                    cc2)
Parameters:
cc1 - 

cc2 - 


completeYourTurnHtml

String completeYourTurnHtml(/*String*/ resourceName)

Called when needing the complete-your-turn game prompt HTML (typically a short sentence about the move and a Send This Move button). Override and set mouse events here. Internally uses the "completeYourTurn" resource.

Overrides:
completeYourTurnHtml in class Game
Parameters:
resourceName - 
(Optional) A resource name to override the default resource to use.
Returns:
HTML for the game prompts.

continueYourTurnHtml

String continueYourTurnHtml(/*String*/ resourceName)

Called when needing the continue-your-turn game prompt HTML (typically a short sentence about the move, no send move button yet). Override and set mouse events here. Internally uses the "continueYourTurn" resource.

Overrides:
continueYourTurnHtml in class Game
Parameters:
resourceName - 
(Optional) A resource name to override the default resource to use.
Returns:
HTML for the game prompts.

deployMaxAnchorClicked

deployMaxAnchorClicked()

deployRegularArmy

deployRegularArmy(point)
Parameters:
point - 


deploymentSizeHtml

deploymentSizeHtml()

deploymentSummaryHtml

deploymentSummaryHtml()

diceHtml

diceHtml()

dispose

dispose()
Overrides:
dispose in class Game

done1ButtonClicked

done1ButtonClicked()

done1Html

done1Html()

doneButtonClicked

doneButtonClicked(force)
Parameters:
force - 


doneHtml

doneHtml()

explainAirStrikesAnchorClicked

explainAirStrikesAnchorClicked()

fortifyButtonClick

fortifyButtonClick()

fortifyFromChange

fortifyFromChange(index)
Parameters:
index - 


fortifyHtml

fortifyHtml()

fortifyIncrementButtonClick

fortifyIncrementButtonClick(reverse,
                            moveAll)
Parameters:
reverse - 

moveAll - 


fortifyMaxAnchorClicked

fortifyMaxAnchorClicked()

fortifyToChange

fortifyToChange(index)
Parameters:
index - 


gambitColorResource

gambitColorResource(resourceName,
                    color)
Parameters:
resourceName - 

color - 


gameAndTradeInfoString

gameAndTradeInfoString()

gamePhaseFromSetup

gamePhaseFromSetup(setup)
Parameters:
setup - 


getActionLinksHtml

String getActionLinksHtml()

Creates HTML for a action links: Open log, open rules, open preferences, and report problem anchors.

Overrides:
getActionLinksHtml in class Game
Returns:
HTML for the action links.

getArmyDeploymentSize

getArmyDeploymentSize()

getArmyString

getArmyString(armies,
              armyType,
              capitol)
Parameters:
armies - 

armyType - 

capitol - 


getAttackButtons

getAttackButtons(small)
Parameters:
small - 


getCaptureButtons

getCaptureButtons(small)
Parameters:
small - 


getFortifyButtons

getFortifyButtons(small)
Parameters:
small - 


getImageSrcByColors

getImageSrcByColors(key)
Parameters:
key - 


getNearestOnBoardPoint

getNearestOnBoardPoint(point)
Parameters:
point - 


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.

getOnBoardAttackHtml

getOnBoardAttackHtml(point)
Parameters:
point - 


getOnBoardCaptureHtml

getOnBoardCaptureHtml(point)
Parameters:
point - 


getOnBoardFortifyHtml

getOnBoardFortifyHtml(point)
Parameters:
point - 


getRandomBoard

getRandomBoard(numPlayers,
               setup)
Parameters:
numPlayers - 

setup - 


getShuffledDeck

getShuffledDeck()

getTeamTitleHtml

String getTeamTitleHtml(/*Team*/ team,
                        /*Boolean*/ top)

Gets the HTML for the team title on the board. By default uses resources 'turnTeamTitle' or 'teamTitle'.

Overrides:
getTeamTitleHtml in class Game
Parameters:
team - 
The team to get the color for.
top - 
Whether this team's title will be displayed above the board or below.
Returns:
The log background color.

getTerritoriesString

getTerritoriesString(territories)
Parameters:
territories - 


hideOnBoardControls

hideOnBoardControls()

highContrast

highContrast(color)
Parameters:
color - 


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.

isMoveLegal

isMoveLegal(point,
            moveData,
            color)
Parameters:
point - 

moveData - 

color - 


itsYourTurnHtml

String itsYourTurnHtml(/*String*/ resourceName)

Called when needing the it-is-your-turn game prompt HTML (typically a short sentence about the move). Override and set mouse events here. Internally uses the "itIsYourTurnToMove" resource.

Overrides:
itsYourTurnHtml in class Game
Parameters:
resourceName - 
(Optional) A resource name to override the default resource to use.
Returns:
HTML for the game prompts.

itsYourTurnNowPlaying

itsYourTurnNowPlaying()

itsYourTurnPickTerritories

itsYourTurnPickTerritories()

itsYourTurnPopulateTerritories

itsYourTurnPopulateTerritories()

maybeCardTableHtml

maybeCardTableHtml(numCols)
Parameters:
numCols - 


maybeShowArrow

maybeShowArrow(fromIndex,
               toIndex)
Parameters:
fromIndex - 

toIndex - 


mouseDown

mouseDown(screenPoint)
Parameters:
screenPoint - 


mouseMove

mouseMove(screenPoint)
Parameters:
screenPoint - 


notYourTurnHtml

String notYourTurnHtml(/*String*/ resourceName)

Called when needing the it-is-not-your-turn game prompt HTML (typically a short sentence with Send Reminder, Refresh Game and Close Window buttons Start Another Game button). Override to set. Internally uses the "notYourTurn" resource.

Overrides:
notYourTurnHtml in class Game
Parameters:
resourceName - 
(Optional) A resource name to override the default resource to use.
Returns:
HTML for the game prompts.

numberFromValueChars

numberFromValueChars(cc1,
                     cc2)
Parameters:
cc1 - 

cc2 - 


occupyingArmiesButtonClicked

occupyingArmiesButtonClicked(territoryIndex)
Parameters:
territoryIndex - 


occupyingArmiesDeployerHtml

occupyingArmiesDeployerHtml()

offerDrawHtml

String offerDrawHtml(/*String*/ resourceName)

Called when needing the offer-a-draw-with-this-move prompts HTML (typically a short sentence and a Offer A Draw checkbox). Override to set. Internally uses the "youMayOfferDraw" and "offerDrawWithThisMove" resources.

Overrides:
offerDrawHtml in class Game
Parameters:
resourceName - 
(Optional) A resource name to override the default resource to use.
Returns:
HTML for the game prompts.

onBoardDoneButtonHtml

onBoardDoneButtonHtml()

openOddsAnchorClicked

openOddsAnchorClicked(screenX,
                      screenY)
Parameters:
screenX - 

screenY - 


openStatistics

openStatistics(event)
Parameters:
event - 


openStatisticsAnchorHtml

openStatisticsAnchorHtml()

pieceColorBgName

pieceColorBgName(color)
Parameters:
color - 


pieceColorFgName

pieceColorFgName(color)
Parameters:
color - 


processOldLogMove

processOldLogMove(move,
                  moveIndex,
                  logIngredients)
Parameters:
move - 

moveIndex - 

logIngredients - 


readyToAttack

readyToAttack()

readyToFortify

readyToFortify()

regularArmiesDeployerHtml

regularArmiesDeployerHtml()

resign

void resign()

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

Overrides:
resign in class Game

roll

roll(attackers,
     defenders,
     rollCacheSize)
Parameters:
attackers - 

defenders - 

rollCacheSize - 


rollCacheSize

rollCacheSize(numAttackers,
              numDefenders)
Parameters:
numAttackers - 

numDefenders - 


rollLog

rollLog(entry,
        startIndex,
        diceSeperator)
Parameters:
entry - 

startIndex - 

diceSeperator - 


selectCard

selectCard(cardIndex)
Parameters:
cardIndex - 


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.

setArmyDeploymentSize

setArmyDeploymentSize(size)
Parameters:
size - 


setHtml

setHtml()

setPlayerPrefs

void setPlayerPrefs()

Extract the player's preferences from the player.info collection, and sets properties accordingly. By default, the font and verbose properties are extracted.

Overrides:
setPlayerPrefs in class Game

setTeamLog

setTeamLog(team)
Parameters:
team - 


showOnBoardAttack

showOnBoardAttack()

showOnBoardCapture

showOnBoardCapture()

showOnBoardFortify

showOnBoardFortify()

showOnBoardOccupyingDeployer

showOnBoardOccupyingDeployer()

spyButtonClick

spyButtonClick(defenderColor)
Parameters:
defenderColor - 


spyHtml

spyHtml()

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.

synchTeam

void synchTeam(/*Team*/ team)

Called to synchronize the team properties with the raw team data. Just the color and title properties are set by default, override to set more.

Overrides:
synchTeam in class Game
Parameters:
team - 
The team to synchronize.

titleArmyWorth

titleArmyWorth(team)
Parameters:
team - 


tournamentHtml

tournamentHtml()

tradeButtonClicked

tradeButtonClicked()

tradeInCards

tradeInCards()

undisableTradeButtons

undisableTradeButtons()

update

void update()

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

Overrides:
update in class Game

valueCharsFromColorNumber

valueCharsFromColorNumber(color,
                          num)
Parameters:
color - 

num -