File: Games\Gambit\Game.js

GamesByEmail
Class GambitTerritory

Object
  
 
 
GamesByEmail.Territory
 
 
GamesByEmail.GambitTerritory

All Implemented Interfaces:

Class


GamesByEmail.GambitTerritory

extends Territory

Constructor Summary
GamesByEmail.GambitTerritory(/*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
 addArmy(number, synch)
StringBuilderappendOverlayHtml(/*StringBuilder*/ htmlBuilder)
Override to add HTML that shows above the territory.
 armyCount(color)
 bestAttackerIndex()
 bestFortifierIndex()
 canAttack(target, visible)
 canBeAttacked(attacker, visible)
 canBeFortified()
 canFortify()
 clearCachedElements()
BooleancontainsPoint(/*Point*/ point)
Checks to see if a point is inside the territory's polygon.
 dispose()
 getNumAdjacent()
 getValue(value)
 hideDeployHilite()
 isBlind()
 isDark()
 isSpy()
 mustAirStrike(target)
 setArmy(color, number, synch)
 setArmy(color, number, synch)
 setValue(value)
 showDeployHilite()
 showHiliteIfAttackableFortafyable()
 synchDark()

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

Methods inherited from Foundation.Class
getTypePath, isInstanceOf

Constructor Detail

GambitTerritory

GamesByEmail.GambitTerritory(/*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

addArmy

addArmy(number,
        synch)
Parameters:
number - 

synch - 


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.

armyCount

armyCount(color)
Parameters:
color - 


bestAttackerIndex

bestAttackerIndex()

bestFortifierIndex

bestFortifierIndex()

canAttack

canAttack(target,
          visible)
Parameters:
target - 

visible - 


canBeAttacked

canBeAttacked(attacker,
              visible)
Parameters:
attacker - 

visible - 


canBeFortified

canBeFortified()

canFortify

canFortify()

clearCachedElements

clearCachedElements()

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.

dispose

dispose()
Overrides:
dispose in class Territory

getNumAdjacent

getNumAdjacent()

getValue

getValue(value)
Parameters:
value - 


hideDeployHilite

hideDeployHilite()

isBlind

isBlind()

isDark

isDark()

isSpy

isSpy()

mustAirStrike

mustAirStrike(target)
Parameters:
target - 


setArmy

setArmy(color,
        number,
        synch)
Parameters:
color - 

number - 

synch - 


setArmy

setArmy(color,
        number,
        synch)
Parameters:
color - 

number - 

synch - 


setValue

setValue(value)
Parameters:
value - 


showDeployHilite

showDeployHilite()

showHiliteIfAttackableFortafyable

showHiliteIfAttackableFortafyable()

synchDark

synchDark()