GODPAPER | All Packages | All Classes | Index | Frames No Frames |
ChessFactoryBase

Package | com.godpaper.as3.business.factory
Class | public class ChessFactoryBase
Inheritance | ChessFactoryBase Object
Implements | com.godpaper.as3.core.IChessFactory
Subclasses | ChessFactory_TicTacToe

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

Protected Properties

| Property | Defined 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

| Method | Defined By
--- | --- | ---
|  | ChessFactoryBase() | ChessFactoryBase
|  | createChessBoard(type:String):IChessBoard Create the type specialed chess board | ChessFactoryBase
|  | createChessGasket(position:Point):IChessGasket Chess gasket manipulate. | ChessFactoryBase
|  | createChessPiece(position:Point, flag:uint = 0):IChessPiece Chess piece manipulate procedure. | ChessFactoryBase
|  | generateChessVO(conductVO:ConductVO):IChessVO ChessVO manipulate. | ChessFactoryBase
|  | generateOmenVO(conductVO:ConductVO):OmenVO OmenVO manipulate. | ChessFactoryBase

Property Detail

chessBoardModel | property

`protected var chessBoardModel:ChessBoardModel`

chessGasketsModel | property |

`protected var chessGasketsModel:ChessGasketsModel`

chessGasketTips | property |

`protected var chessGasketTips:String`

chessPieceLabel | property |

`protected var chessPieceLabel:String`

chessPieceName | property |

`protected var chessPieceName:String`

chessPiecesModel | property |

`protected var chessPiecesModel:ChessPiecesModel`

chessPieceSource | property |

`protected var chessPieceSource:Object`

chessPieceSubType | property |

`protected var chessPieceSubType:String = null`

chessPieceType | property |

`protected var chessPieceType:String`

chessPieceValue | property |

`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).

Thu Jan 16 2014, 01:11 PM +08:00