Games\Phalanx\Game.js
GamesByEmail
Object
GamesByEmail.Piece
All Implemented Interfaces:
GamesByEmail.PhalanxPiece
extendsPiece
Constructor Summary |
Creates a piece.
|
Field Summary |
Fields inherited from GamesByEmail.Piece |
boardPoint , hidden , index , pieces , valueIndex |
Method Summary | |
|
Centers the piece on a point.
|
|
|
|
|
|
|
|
|
|
Gets the screen rectangle for this piece based on its
boardPoint property. |
|
Determines if a piece occupies a board point.
|
|
Removes a piece.
|
|
|
|
|
|
|
Methods inherited from GamesByEmail.Piece |
appendHtml , create , elementId , event , getBoardValue , getClipRect , getElement , getImageSrc , isColor , isOurs , move , reset , setBoardValue , setColor , setHidden , setValue , setValueAndColor , setVisibility , snap |
Methods inherited from Foundation.Class |
getTypePath , isInstanceOf |
Constructor Detail |
GamesByEmail.PhalanxPiece(/*Pieces
*/ pieces,
/*Number
*/ index,
/*Number
*/ value,
/*Number
*/ valueIndex,
/*Boolean
*/ hidden)
Creates a piece.
Parameters:pieces -The parent pieces object.
index -The position of this piece in the parent pieces object.
value -The value of this piece.
valueIndex -The position of this piece's value in the result of the pieces getValue call. Set to -1 to not include in getValue.
hidden -Whether the piece is visible to the current player or not.
Method Detail |
void
center(/*Point
*/ screenPoint,
/*Boolean
*/ noConstrain)
Centers the piece on a point.
Overrides: Parameters:screenPoint -The screen point on which to center.
noConstrain -(Optional) Override the game's
GamesByEmail.Game.constrainer
rectangle.
dispose()
getBoardMuster()
getExtendedPoints()
getPhalanxedHtml()
Rectangle
getScreenRect(/*String
*/ boardPoint)
Gets the screen rectangle for this piece based on its boardPoint
property.
getScreenRect
in class Piece
boardPoint -(Optional) If provided, calculates with this value instead of its internal
boardPoint
property.
Boolean
occupiesBoardPoint(/*Point
*/ boardPoint)
Determines if a piece occupies a board point.
Overrides:occupiesBoardPoint
in class Piece
boardPoint -(Optional) The board point to check, or NULL if looking for an unplaced piece.
void
remove()
setPhalanxed(phalanxed)
phalanxed -
translateCenterByMuster(screenCenter,
reverse)
screenCenter -
reverse -
wouldOccupyBoardPoint(boardPoint)
boardPoint -