Public Member Functions | Protected Attributes | Static Protected Attributes

SinglePlayerMatch Class Reference

Singleplayer match class. More...

#include <SinglePlayerMatch.h>

Inheritance diagram for SinglePlayerMatch:
Match

List of all members.

Public Member Functions

 SinglePlayerMatch (int aiDifficulty)
 ~SinglePlayerMatch () override
int Update (double deltaTime, CIw2DFont *font) override

Protected Attributes

AIOpponentm_ai
 The AI opponent for the match.
int m_sleepTimer
 Sleep timer for displaying AI messages.
int m_aiDifficulty
 Int representing the ai difficulty (1 = easy, 2 = medium, 3 = hard).

Static Protected Attributes

static const int m_aiTurnLength = 50
 How long will an ai turn take?

Detailed Description

Singleplayer match class.

Singleplayer game with an AI opponent.


Constructor & Destructor Documentation

SinglePlayerMatch::SinglePlayerMatch ( int  aiDifficulty  ) 

Constructor.

Create a new singleplayer match.

SinglePlayerMatch::~SinglePlayerMatch (  )  [override]

Destructor.

Destroy the match and release all associated memory.


Member Function Documentation

int SinglePlayerMatch::Update ( double  deltaTime,
CIw2DFont *  font 
) [override, virtual]

Update.

Update the match and handle user input (if any).

Parameters:
[in] deltaTime Time since the last update.
[in] font Font for rendering text.
Returns:
int representing new game state (if any).

Implements Match.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations