mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 17:46:26 +08:00
Move time related global variables under TimeManager
Move OptimumSearchTime, MaximumSearchTime and ExtraSearchTime in TimeManager. Note that we remove an useless initialization to 0 because these variables are used only with time management. Also introduce and use TimeManager::available_time() No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -28,8 +28,13 @@
|
||||
class TimeManager {
|
||||
public:
|
||||
|
||||
void update(int myTime, int myInc, int movesToGo, int currentPly,
|
||||
int* optimumSearchTime, int* maximumSearchTime);
|
||||
void update(int myTime, int myInc, int movesToGo, int currentPly);
|
||||
void best_move_changes(int curIter, int prevIter);
|
||||
int available_time() { return optimumSearchTime + extraSearchTime; }
|
||||
|
||||
int optimumSearchTime;
|
||||
int maximumSearchTime;
|
||||
int extraSearchTime;
|
||||
};
|
||||
|
||||
#endif // !defined(TIMEMAN_H_INCLUDED)
|
||||
|
||||
Reference in New Issue
Block a user