#include <OthelloController.h>
Inheritance diagram for COthelloController:

Public Slots | |
| bool | PieceClicked (uint32, uint32) |
| PieceClicked. | |
| void | PieceTypeChanged (uint32, uint32, COthelloPiece::TYPE) |
| PieceTypeChanged. | |
Public Member Functions | |
| COthelloController (QWidget *target) | |
| COthelloController. | |
| COthelloController (QWidget *target, uint32 studentID, const int8 *name, uint32 nameLength, CaffeineGUID gameID, bool bIsSpectator=false) | |
| COthelloController. | |
| ~COthelloController () | |
| ~COthelloController | |
Protected Member Functions | |
| void | NewGame () |
| NewGame. | |
| void | Play (const CPiece *) |
| Play. | |
| void | PlayMove (const CMove *m) |
| PlayMove. | |
| bool | CheckMove (CMove *m) |
| CheckMove. | |
| bool | CheckForWin () |
| CheckForWin. | |
| void | UpdateCurrentPlayerPiece () |
| UpdateCurrentPlayerPiece. | |
| bool | HasMoves (COthelloPiece p) const |
| HasMoves. | |
| void | SetPlayerPiece (const CPiece *p) |
| SetPlayerPiece. | |
| void | TimeElapsed (const CPlayerPiece *piece) |
| TimeElapsed. | |
Description: This class is the controller class for the Othello GUI. It verifies moves and choses the the next player's turn. It will also communicate with the Caffeine Client if doing a AI/Tournament game.
Limitations: NONE
|
|
COthelloController. Description: Class constructor
|
|
||||||||||||||||||||||||||||
|
COthelloController. Description: Class constructor
|
|
|
~COthelloController Description: Class deconstructor Limitations: NONE |
|
|
CheckForWin. Description: Checks for a win state and sets the m_winningPiece variable if in a win state.
Implements CGUIController. |
|
|
CheckMove. Description: Validates a given move. Returns true if the move is valid and false otherwise.
Implements CGUIController. |
|
|
HasMoves. Description: Checks to see if the piece has any moves.
|
|
|
NewGame. Description: Resets all the board pieces to their default values.
Implements CGUIController. |
|
||||||||||||
|
PieceClicked. Description: Creates a move based on the square clicked by the user and tries to play the move.
|
|
||||||||||||||||
|
PieceTypeChanged. Description: Function called when a piece on the board changes type. Sends the update to the GUI.
|
|
|
Play. Description: Tells the GUI to play a move. This is needed so that we can pass stochastic elements to the game controller (eg dice rolls).
Implements CGUIController. |
|
|
PlayMove. Description: Plays a given move.
Implements CGUIController. |
|
|
SetPlayerPiece. Description: Sets the player piece.
Implements CGUIController. |
|
|
TimeElapsed. Description: Called when either a player's move time or game time has expired
Implements CGUIController. |
|
|
UpdateCurrentPlayerPiece. Description:
Implements CGUIController. |