Packagecom.godpaper.as3.business.factory
Classpublic class ChessFactoryBase
InheritanceChessFactoryBase Inheritance Object
Implements com.godpaper.as3.core.IChessFactory
Subclasses ChessFactory_TicTacToe

Simply factory produce ChessPiece/ChessGasket/ChessVO/OmenVO and relatived properties.



Protected Properties
 PropertyDefined By
  chessBoardModel : ChessBoardModel
ChessFactoryBase
  chessGasketsModel : ChessGasketsModel
ChessFactoryBase
  chessGasketTips : String
ChessFactoryBase
  chessPieceLabel : String
ChessFactoryBase
  chessPieceName : String
ChessFactoryBase
  chessPiecesModel : ChessPiecesModel
ChessFactoryBase
  chessPieceSource : Object
ChessFactoryBase
  chessPieceSubType : String = null
ChessFactoryBase
  chessPieceType : String
ChessFactoryBase
  chessPieceValue : int = 0
ChessFactoryBase
Public Methods
 MethodDefined By
  
ChessFactoryBase
  
Create the type specialed chess board
ChessFactoryBase
  
Chess gasket manipulate.
ChessFactoryBase
  
createChessPiece(position:Point, flag:uint = 0):IChessPiece
Chess piece manipulate procedure.
ChessFactoryBase
  
ChessVO manipulate.
ChessFactoryBase
  
OmenVO manipulate.
ChessFactoryBase
Property Detail
chessBoardModelproperty
protected var chessBoardModel:ChessBoardModel

chessGasketsModelproperty 
protected var chessGasketsModel:ChessGasketsModel

chessGasketTipsproperty 
protected var chessGasketTips:String

chessPieceLabelproperty 
protected var chessPieceLabel:String

chessPieceNameproperty 
protected var chessPieceName:String

chessPiecesModelproperty 
protected var chessPiecesModel:ChessPiecesModel

chessPieceSourceproperty 
protected var chessPieceSource:Object

chessPieceSubTypeproperty 
protected var chessPieceSubType:String = null

chessPieceTypeproperty 
protected var chessPieceType:String

chessPieceValueproperty 
protected var chessPieceValue:int = 0

Constructor Detail
ChessFactoryBase()Constructor
public function ChessFactoryBase()



Method Detail
createChessBoard()method
public function createChessBoard(type:String):IChessBoard

Create the type specialed chess board

Parameters

type:String — the chess board type(intersection,checkering,segament,fractal...)

Returns
IChessBoard — the IChessBoard.
createChessGasket()method 
public function createChessGasket(position:Point):IChessGasket

Chess gasket manipulate.

Parameters

position:Point

Returns
IChessGasket — ChessGasket component which implement IChessGasket
createChessPiece()method 
public function createChessPiece(position:Point, flag:uint = 0):IChessPiece

Chess piece manipulate procedure.

Parameters

position:Point — chessPiece's position type is Point(x, y).
 
flag:uint (default = 0) — chessPices's side flag.(red/blue).

Returns
IChessPiece — ChessPiece component with implement IChessPiece or NULL.
generateChessVO()method 
public function generateChessVO(conductVO:ConductVO):IChessVO

ChessVO manipulate.

Parameters

conductVO:ConductVO — has property target(type is chessPiece) and newPosition([0,1]).

Returns
IChessVO — precise chess value object(prototype is chessVOBase).
generateOmenVO()method 
public function generateOmenVO(conductVO:ConductVO):OmenVO

OmenVO manipulate.

Parameters

conductVO:ConductVO — has property target(type is chessPiece) and newPosition([0,1]).

Returns
OmenVO — precise chess value object(prototype is OmenVO).