TimeManager Class Reference

Time management. More...

#include <engine.h>

List of all members.

Public Member Functions

void startClock ()
 Starts clock for given move.
void stopClock ()
 Stops the clock.
bool timeUp ()
 Checks the clock.
double secondsElapsed ()
 Seconds elapsed since last startClock().
void setTimeControl (timeControl_e tc, float value)
 Setting time controls from aei.
float getTimeControl (timeControl_e tc)
 Time Control getter.
void setNoTimeLimit ()
 Sets time unlimited search.
void resetSettings ()
 Resets temporary settings like noTimeLimit.

Private Attributes

Timer timer
float timeControls_ [TIME_CONTROLS_NUM]
bool noTimeLimit_


Detailed Description

Time management.

Accepts time settings and takes care of time management durint the game.


Member Function Documentation

void TimeManager::setTimeControl ( timeControl_e  tc,
float  value 
)

Setting time controls from aei.

Parameters:
tc Time control identifier - used as index into timeControls array.
value Value for option in seconds (all controal are aligned to secs).

bool TimeManager::timeUp (  ) 

Checks the clock.

Returns:
True if time is up, false otherwise. TODO: Searcher might provide importance of time addition.


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

Generated on Thu Aug 6 23:29:10 2009 for akimot by  doxygen 1.5.7.1