Public Types | |
enum | TState { ENewGame, EPlaying, EFinished, ENewGame, EPlaying, EFinished } |
enum | TState { ENewGame, EPlaying, EFinished, ENewGame, EPlaying, EFinished } |
Public Member Functions | |
virtual | ~COandXController () |
void | Reset () |
TBool | HitSquareL (TInt aIndex) |
void | SwitchTurn () |
TBool | IsNewGame () const |
TBool | IsCrossTurn () const |
void | ExternalizeL (RWriteStream &aStream) const |
void | InternalizeL (RReadStream &aStream) |
void | Reset () |
TBool | HitSquareL (TInt aIndex) |
void | SwitchTurn () |
void | ResetStats () |
TBool | IsNewGame () const |
TBool | IsCrossTurn () const |
TUint | GamesPlayed () const |
TUint | WonByO () const |
TUint | WonByX () const |
TTileState | GameRecord (TInt aIndex) |
void | ExternalizeL (RWriteStream &aStream) const |
void | InternalizeL (RReadStream &aStream) |
Static Public Member Functions | |
static COandXController * | NewL () |
static COandXController * | NewL () |
This controller uses instructions from the user to update the engine (board.)
Definition at line 33 of file oandxcontroller.h.
COandXController::~COandXController | ( | ) | [virtual] |
Destructor is defined here to ensure only one instance is generated.
Definition at line 49 of file oandxcontroller.cpp.
COandXController * COandXController::NewL | ( | ) | [static] |
Factory function allocates new instance of COandXController.
Definition at line 26 of file oandxcontroller.cpp.
void COandXController::Reset | ( | ) |
Cancel the current game, clearing the board and setting noughts as the current player.
Definition at line 88 of file oandxcontroller.cpp.
void COandXController::ExternalizeL | ( | RWriteStream & | aStream | ) | const |
Persist the controller's state to the supplied stream. Specifically, writes out the state, whose turn it is, and which symbol the local player is using.
aStream | Stream to which the controller's state will be written. |
Definition at line 60 of file oandxcontroller.cpp.
void COandXController::InternalizeL | ( | RReadStream & | aStream | ) |
Standard stream store internalization function, restores state, whose turn, and which symbol the local player is using.
aStream | Stream which contains externalized state. |
Definition at line 75 of file oandxcontroller.cpp.