Turn information class. More...
#include <turninformation.h>
Public Member Functions | |
TurnInformation (int turnId, bool white) | |
Turn information object. | |
int | getTurnId () const |
int | getDuration () const |
Duration of turn. | |
int | getPaused () const |
Duration of pauses during this turn. | |
int | getTimeAfter () const |
Time available for this player after this turn. | |
bool | isWhiteTurn () const |
void | addTime (int msecs) |
void | addPause (int msecs) |
void | turnReady (int msecs) |
Mark turn ready. | |
Protected Attributes | |
int | turnId_ |
int | duration_ |
id of turn | |
int | paused_ |
duration of turn in msecs | |
int | timeAfter_ |
duration of pauses in msecs | |
bool | turnReady_ |
time available after this turn in msecs | |
bool | white_ |
turn is ready and locked |
Turn information class.
Store information about one turn of player
Definition at line 34 of file turninformation.h.
TurnInformation::TurnInformation | ( | int | turnId, | |
bool | white | |||
) |
Turn information object.
turnId | Id of turn of player | |
white | true if turn on white, false id black |
Definition at line 24 of file turninformation.cpp.
void TurnInformation::addPause | ( | int | msecs | ) |
Definition at line 40 of file turninformation.cpp.
void TurnInformation::addTime | ( | int | msecs | ) |
Definition at line 34 of file turninformation.cpp.
int TurnInformation::getDuration | ( | ) | const [inline] |
Duration of turn.
Definition at line 47 of file turninformation.h.
int TurnInformation::getPaused | ( | ) | const [inline] |
Duration of pauses during this turn.
Definition at line 51 of file turninformation.h.
int TurnInformation::getTimeAfter | ( | ) | const |
Time available for this player after this turn.
Definition at line 53 of file turninformation.cpp.
int TurnInformation::getTurnId | ( | ) | const [inline] |
Definition at line 43 of file turninformation.h.
bool TurnInformation::isWhiteTurn | ( | ) | const [inline] |
Definition at line 56 of file turninformation.h.
void TurnInformation::turnReady | ( | int | msecs | ) |
Mark turn ready.
Turn will be locked to chances.
msecs | Time available after this turn in msecs |
Definition at line 47 of file turninformation.cpp.
int TurnInformation::duration_ [protected] |
id of turn
Definition at line 72 of file turninformation.h.
int TurnInformation::paused_ [protected] |
duration of turn in msecs
Definition at line 73 of file turninformation.h.
int TurnInformation::timeAfter_ [protected] |
duration of pauses in msecs
Definition at line 74 of file turninformation.h.
int TurnInformation::turnId_ [protected] |
Definition at line 71 of file turninformation.h.
bool TurnInformation::turnReady_ [protected] |
time available after this turn in msecs
Definition at line 75 of file turninformation.h.
bool TurnInformation::white_ [protected] |
turn is ready and locked
Definition at line 76 of file turninformation.h.