Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

Kodu::ScoreKeeper Class Reference

Score Keeper. More...

#include <ScoreKeeper.h>


Detailed Description

Score Keeper.

Definition at line 84 of file ScoreKeeper.h.

List of all members.

Public Member Functions

 ScoreKeeper ()
 Constructor.
 ~ScoreKeeper ()
 Destructor.
ScoreKeeperoperator= (const ScoreKeeper &kKeeper)
 Assignment operator.
int addScore (const std::string &, int)
 Adds to a particular score.
int checkScoreValue (const std::string &)
 Checks the value of a particular score.
void initialize ()
 (Re)Initializes the score board
bool registerScore (const std::string &)
 Registers an entry for a new score based on the key provided.
bool scoreExists (const std::string &)
 Checks if a particular score type (identified by color+letter key) exists.
int setScore (const std::string &, int)
 Sets a particular score.
int subtractScore (const std::string &, int)
 Subtracts from a particular score.

Private Member Functions

 DISALLOW_COPY (ScoreKeeper)
 Disallows the copy constructor and assignment operator.

Private Attributes

std::map< std::string, int > scoreBoard
 Contains all the global scores.

Constructor & Destructor Documentation

Kodu::ScoreKeeper::ScoreKeeper (  ) 

Constructor.

Definition at line 87 of file ScoreKeeper.h.

Kodu::ScoreKeeper::~ScoreKeeper (  ) 

Destructor.

Definition at line 92 of file ScoreKeeper.h.


Member Function Documentation

int Kodu::ScoreKeeper::addScore ( const std::string &  scoreKey,
int  value 
)

Adds to a particular score.

Definition at line 25 of file ScoreKeeper.cc.

Referenced by Kodu::KoduWorld::applyGlobalScoreChanges().

int Kodu::ScoreKeeper::checkScoreValue ( const std::string &  scoreKey  ) 

Checks the value of a particular score.

Definition at line 36 of file ScoreKeeper.cc.

Referenced by Kodu::KoduWorld::getScoreValue().

Kodu::ScoreKeeper::DISALLOW_COPY ( ScoreKeeper   )  [private]

Disallows the copy constructor and assignment operator.

void Kodu::ScoreKeeper::initialize (  ) 

(Re)Initializes the score board

Definition at line 43 of file ScoreKeeper.cc.

Referenced by Kodu::KoduWorld::~KoduWorld().

ScoreKeeper& Kodu::ScoreKeeper::operator= ( const ScoreKeeper kKeeper  ) 

Assignment operator.

Definition at line 97 of file ScoreKeeper.h.

bool Kodu::ScoreKeeper::registerScore ( const std::string &  scoreKey  ) 

Registers an entry for a new score based on the key provided.

Definition at line 48 of file ScoreKeeper.cc.

Referenced by addScore(), checkScoreValue(), setScore(), and subtractScore().

bool Kodu::ScoreKeeper::scoreExists ( const std::string &  scoreKey  ) 

Checks if a particular score type (identified by color+letter key) exists.

Definition at line 57 of file ScoreKeeper.cc.

Referenced by addScore(), checkScoreValue(), registerScore(), setScore(), and subtractScore().

int Kodu::ScoreKeeper::setScore ( const std::string &  scoreKey,
int  value 
)

Sets a particular score.

Definition at line 61 of file ScoreKeeper.cc.

Referenced by Kodu::KoduWorld::applyGlobalScoreChanges().

int Kodu::ScoreKeeper::subtractScore ( const std::string &  scoreKey,
int  value 
)

Subtracts from a particular score.

Definition at line 72 of file ScoreKeeper.cc.

Referenced by Kodu::KoduWorld::applyGlobalScoreChanges().


Member Data Documentation

std::map<std::string, int> Kodu::ScoreKeeper::scoreBoard [private]

Contains all the global scores.

Definition at line 130 of file ScoreKeeper.h.

Referenced by addScore(), checkScoreValue(), initialize(), operator=(), registerScore(), scoreExists(), setScore(), subtractScore(), and ~ScoreKeeper().


The documentation for this class was generated from the following files:

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:23 2016 by Doxygen 1.6.3