All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Member Functions | Private Attributes | List of all members
osl::game_playing::TimeKeeper Class Reference

#include <timeKeeper.h>

Classes

struct  Stack
 

Public Member Functions

 TimeKeeper ()
 
 TimeKeeper (int black_time, int white_time)
 
 ~TimeKeeper ()
 
void reset (int black_time, int white_time)
 
void pushMove (Player, int seconds)
 
void popMove ()
 
int timeLeft (Player) const
 
int timeElapsed (Player) const
 
int timeLimit (Player) const
 

Private Attributes

boost::scoped_ptr< Stackseconds
 

Detailed Description

Definition at line 12 of file timeKeeper.h.

Constructor & Destructor Documentation

osl::game_playing::TimeKeeper::TimeKeeper ( )

Definition at line 12 of file timeKeeper.cc.

References reset().

osl::game_playing::TimeKeeper::TimeKeeper ( int  black_time,
int  white_time 
)

Definition at line 18 of file timeKeeper.cc.

References reset().

osl::game_playing::TimeKeeper::~TimeKeeper ( )

Definition at line 25 of file timeKeeper.cc.

Member Function Documentation

void osl::game_playing::TimeKeeper::popMove ( )

Definition at line 48 of file timeKeeper.cc.

void osl::game_playing::TimeKeeper::pushMove ( Player  turn,
int  seconds 
)

Definition at line 37 of file timeKeeper.cc.

References osl::BLACK.

void osl::game_playing::TimeKeeper::reset ( int  black_time,
int  white_time 
)

Definition at line 30 of file timeKeeper.cc.

Referenced by TimeKeeper().

int osl::game_playing::TimeKeeper::timeElapsed ( Player  player) const

Definition at line 62 of file timeKeeper.cc.

int osl::game_playing::TimeKeeper::timeLeft ( Player  player) const

Definition at line 55 of file timeKeeper.cc.

References osl::BLACK.

Referenced by osl::game_playing::CsaLogger::showTimeLeft().

int osl::game_playing::TimeKeeper::timeLimit ( Player  player) const

Definition at line 68 of file timeKeeper.cc.

References osl::BLACK.

Member Data Documentation

boost::scoped_ptr<Stack> osl::game_playing::TimeKeeper::seconds
private

Definition at line 14 of file timeKeeper.h.


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