File: Games\Phalanx\Game.js

GamesByEmail
Class PhalanxPiece

Object
  
 
 
GamesByEmail.Piece
 
 
GamesByEmail.PhalanxPiece

All Implemented Interfaces:

Class


GamesByEmail.PhalanxPiece

extends Piece

Constructor Summary
GamesByEmail.PhalanxPiece(/*Pieces*/ pieces, /*Number*/ index, /*Number*/ value, /*Number*/ valueIndex, /*Boolean*/ hidden)
Creates a piece.

Field Summary

Fields inherited from GamesByEmail.Piece
boardPoint, hidden, index, pieces, valueIndex

Method Summary
voidcenter(/*Point*/ screenPoint, /*Boolean*/ noConstrain)
Centers the piece on a point.
 dispose()
 getBoardMuster()
 getExtendedPoints()
 getPhalanxedHtml()
RectanglegetScreenRect(/*String*/ boardPoint)
Gets the screen rectangle for this piece based on its boardPoint property.
BooleanoccupiesBoardPoint(/*Point*/ boardPoint)
Determines if a piece occupies a board point.
voidremove()
Removes a piece.
 setPhalanxed(phalanxed)
 translateCenterByMuster(screenCenter, reverse)
 wouldOccupyBoardPoint(boardPoint)

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

PhalanxPiece

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

center

void center(/*Point*/ screenPoint,
            /*Boolean*/ noConstrain)

Centers the piece on a point.

Overrides:
center in class Piece
Parameters:
screenPoint - 
The screen point on which to center.
noConstrain - 
(Optional) Override the game's GamesByEmail.Game.constrainer rectangle.

dispose

dispose()
Overrides:
dispose in class Piece

getBoardMuster

getBoardMuster()

getExtendedPoints

getExtendedPoints()

getPhalanxedHtml

getPhalanxedHtml()

getScreenRect

Rectangle getScreenRect(/*String*/ boardPoint)

Gets the screen rectangle for this piece based on its boardPoint property.

Overrides:
getScreenRect in class Piece
Parameters:
boardPoint - 
(Optional) If provided, calculates with this value instead of its internal boardPoint property.

occupiesBoardPoint

Boolean occupiesBoardPoint(/*Point*/ boardPoint)

Determines if a piece occupies a board point.

Overrides:
occupiesBoardPoint in class Piece
Parameters:
boardPoint - 
(Optional) The board point to check, or NULL if looking for an unplaced piece.
Returns:
TRUE if the board point is occupied by the piece, and FALSE otherwise.

remove

void remove()

Removes a piece.

Overrides:
remove in class Piece

setPhalanxed

setPhalanxed(phalanxed)
Parameters:
phalanxed - 


translateCenterByMuster

translateCenterByMuster(screenCenter,
                        reverse)
Parameters:
screenCenter - 

reverse - 


wouldOccupyBoardPoint

wouldOccupyBoardPoint(boardPoint)
Parameters:
boardPoint -