Time settings for a Go game. More...
#include <GoTimeSettings.h>
Public Member Functions | |
GoTimeSettings () | |
Construct time settings with no time limit. | |
GoTimeSettings (double mainTime) | |
GoTimeSettings (double mainTime, double overtime, int overtimeMoves) | |
Construct time settings. | |
bool | operator== (const GoTimeSettings &timeSettings) const |
double | MainTime () const |
double | Overtime () const |
int | OvertimeMoves () const |
bool | IsUnknown () const |
Private Attributes | |
double | m_mainTime |
Main time measured in seconds. | |
double | m_overtime |
Byo yomi time measured in seconds. | |
int | m_overtimeMoves |
Number of stones per byo yomi period. |
Time settings for a Go game.
Definition at line 12 of file GoTimeSettings.h.
GoTimeSettings::GoTimeSettings | ( | ) |
Construct time settings with no time limit.
Definition at line 11 of file GoTimeSettings.cpp.
References IsUnknown(), and SG_ASSERT.
GoTimeSettings::GoTimeSettings | ( | double | mainTime | ) |
Definition at line 19 of file GoTimeSettings.cpp.
GoTimeSettings::GoTimeSettings | ( | double | mainTime, | |
double | overtime, | |||
int | overtimeMoves | |||
) |
Construct time settings.
Currently supports Canadian byo yomi, including absolute time (no byo yomi) as a special case.
mainTime | Main time measured in seconds. | |
overtime | Byo yomi time measured in seconds. | |
overtimeMoves | Number of stones per byo yomi period. |
Definition at line 25 of file GoTimeSettings.cpp.
References SG_ASSERT.
bool GoTimeSettings::IsUnknown | ( | ) | const |
Definition at line 44 of file GoTimeSettings.cpp.
References m_overtime, and m_overtimeMoves.
Referenced by GoGtpEngine::GenMove(), GoTimeSettings(), and GoGame::SetTimeSettingsGlobal().
double GoTimeSettings::MainTime | ( | ) | const |
Definition at line 49 of file GoTimeSettings.h.
References m_mainTime.
Referenced by GoGame::SetTimeSettingsGlobal().
bool GoTimeSettings::operator== | ( | const GoTimeSettings & | timeSettings | ) | const |
Definition at line 36 of file GoTimeSettings.cpp.
References m_mainTime, m_overtime, and m_overtimeMoves.
double GoTimeSettings::Overtime | ( | ) | const |
Definition at line 54 of file GoTimeSettings.h.
References m_overtime.
Referenced by GoGame::SetTimeSettingsGlobal().
int GoTimeSettings::OvertimeMoves | ( | ) | const |
Definition at line 59 of file GoTimeSettings.h.
References m_overtimeMoves.
Referenced by GoGame::SetTimeSettingsGlobal().
double GoTimeSettings::m_mainTime [private] |
Main time measured in seconds.
Definition at line 40 of file GoTimeSettings.h.
Referenced by MainTime(), and operator==().
double GoTimeSettings::m_overtime [private] |
Byo yomi time measured in seconds.
Definition at line 43 of file GoTimeSettings.h.
Referenced by IsUnknown(), operator==(), and Overtime().
int GoTimeSettings::m_overtimeMoves [private] |
Number of stones per byo yomi period.
Definition at line 46 of file GoTimeSettings.h.
Referenced by IsUnknown(), operator==(), and OvertimeMoves().