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

Package | com.godpaper.as3.business.managers
Class | public class GameStateManagerDefault
Inheritance | GameStateManagerDefault Object
Implements | com.godpaper.as3.core.IGameStateManager

A player manager class to maintain turn-based game. Include sort of properties and methods for identifying game status.

Public Properties

| Property | Defined By
--- | --- | ---
|  | agent : GameAgent | GameStateManagerDefault
|  | isBlueSide : Boolean [read-only] | GameStateManagerDefault
|  | isGreenSide : Boolean [read-only] | GameStateManagerDefault
|  | isRedSide : Boolean [read-only] | GameStateManagerDefault
|  | isRunning : Boolean | GameStateManagerDefault
|  | level : int | GameStateManagerDefault
|  | phase : uint [read-only] The game phase is decided by how many pieces both sides have left. | GameStateManagerDefault

Protected Properties

| Property | Defined By
--- | --- | ---
|  | _roles : uint = 0 | GameStateManagerDefault

Public Methods

| Method | Defined By
--- | --- | ---
|  | GameStateManagerDefault() | GameStateManagerDefault
|  | anotherHumanWin():void | GameStateManagerDefault
|  | computerWin():void | GameStateManagerDefault
|  | getRolePlaying(flagMask:uint):Boolean | GameStateManagerDefault
|  | humanWin():void | GameStateManagerDefault
|  | isAnotherHumanTurnNow():void | GameStateManagerDefault
|  | isComputerTurnNow():void | GameStateManagerDefault
|  | isHumanTurnNow():void | GameStateManagerDefault
|  | loop():void | GameStateManagerDefault
|  | restart():void | GameStateManagerDefault
|  | start():void | GameStateManagerDefault

Public Constants

| Constant | Defined By
--- | --- | ---
|  | PHASE_ENDING : uint [static] | GameStateManagerDefault
|  | PHASE_MIDDLE : uint [static] | GameStateManagerDefault
|  | PHASE_OPENING : uint [static] | GameStateManagerDefault
|  | TURN_NOW_ANOTHER_HUMAN : uint [static] | GameStateManagerDefault
|  | TURN_NOW_COMPUTER : uint [static] | GameStateManagerDefault
|  | TURN_NOW_HUMAN : uint [static] | GameStateManagerDefault

Property Detail

_roles | property

`protected var _roles:uint = 0`

agent | property |

`public var agent:GameAgent`

isBlueSide | property |

`isBlueSide:Boolean` [read-only]

Implementation
`public function get isBlueSide():Boolean`

isGreenSide | property |

`isGreenSide:Boolean` [read-only]

Implementation
`public function get isGreenSide():Boolean`

isRedSide | property |

`isRedSide:Boolean` [read-only]

Implementation
`public function get isRedSide():Boolean`

isRunning | property |

`isRunning:Boolean`

Implementation
`public function get isRunning():Boolean`
`public function set isRunning(value:Boolean):void`

level | property |

`level:int`

Implementation
`public function get level():int`
`public function set level(value:int):void`

phase | property |

`phase:uint` [read-only]

The game phase is decided by how many pieces both sides have left.

Implementation
`public function get phase():uint`
Constructor Detail

GameStateManagerDefault | () | Constructor

`public function GameStateManagerDefault()`

Method Detail

anotherHumanWin | () | method

`public function anotherHumanWin():void`

computerWin | () | method |

`public function computerWin():void`

getRolePlaying | () | method |

`public function getRolePlaying(flagMask:uint):Boolean`

Parameters

| `flagMask:uint`

Returns

| `Boolean`

humanWin | () | method |

`public function humanWin():void`

isAnotherHumanTurnNow | () | method |

`public function isAnotherHumanTurnNow():void`

isComputerTurnNow | () | method |

`public function isComputerTurnNow():void`

isHumanTurnNow | () | method |

`public function isHumanTurnNow():void`

loop | () | method |

`public function loop():void`

restart | () | method |

`public function restart():void`

start | () | method |

`public function start():void`

Constant Detail

PHASE_ENDING | Constant

`public static const PHASE_ENDING:uint`

PHASE_MIDDLE | Constant |

`public static const PHASE_MIDDLE:uint`

PHASE_OPENING | Constant |

`public static const PHASE_OPENING:uint`

TURN_NOW_ANOTHER_HUMAN | Constant |

`public static const TURN_NOW_ANOTHER_HUMAN:uint`

TURN_NOW_COMPUTER | Constant |

`public static const TURN_NOW_COMPUTER:uint`

TURN_NOW_HUMAN | Constant |

`public static const TURN_NOW_HUMAN:uint`

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