Belofte version 2.1.8
A promising chess program using the UCI or Winboard interface
bLevel Class Referencefinal

#include <level.h>

Public Member Functions

 bLevel ()
 
 ~bLevel ()
 
 bLevel (bLevel const &)=default
 
bLeveloperator= (bLevel const &)=default
 
 bLevel (bLevel &&)=delete
 
bLeveloperator= (bLevel &&)=delete
 
 operator std::string () const
 
void flagLevelChanged ()
 
void setGameTime (int const msPerGame)
 new level or new game
 
void setGameTime (int const msPerGame, int const msIncrementPerMove)
 
void setMoveTime (int const msPerMove)
 
void setMoveTime (int const msPerGame, int const nMoves)
 
void setMoveTime (int const msPerGame, int const nMoves, int const msIncrementPerMove)
 
void setInfinite ()
 
void setMateSearch (depth_t const d)
 
void setMoves (std::string movelist)
 
void setNodes (int64_t n)
 
void setPondering ()
 
void clearPondering ()
 
bool isPondering () const
 
LevelType getType () const
 
void setSearchDepth (depth_t const d)
 
depth_t getSearchDepth () const
 
void setQSDepth (depth_t const d)
 
depth_t getQSDepth () const
 
void setMaxDepth (depth_t const d)
 
depth_t getMaxDepth () const
 
void setDepthCommand (depth_t const d)
 
bool searchDepthReached (depth_t const d) const
 
bool qsDepthReached (depth_t const d) const
 
bool stoppingSearch (long const nTimeElapsed) const
 Stop search required ?
 
bool stillTimeLeft (depth_t const d, long const nTimeElapsed) const
 Do we still have time to do another iteration ?
 
void setRemainingTime (int const msPerGame)
 xboard issues time command to update available time
 
void setMovePlayed ()
 
void undoMovePlayed ()
 used for recalibrating time in case for undo move in xboard moves per period
 

Detailed Description

Definition at line 49 of file level.h.

Constructor & Destructor Documentation

◆ bLevel() [1/3]

bLevel::bLevel ( )

Definition at line 12 of file level.cpp.

+ Here is the call graph for this function:

◆ ~bLevel()

bLevel::~bLevel ( )

Definition at line 21 of file level.cpp.

◆ bLevel() [2/3]

bLevel::bLevel ( bLevel const &  )
default

◆ bLevel() [3/3]

bLevel::bLevel ( bLevel &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

bLevel & bLevel::operator= ( bLevel const &  )
default

◆ operator=() [2/2]

bLevel & bLevel::operator= ( bLevel &&  )
delete

◆ operator std::string()

bLevel::operator std::string ( ) const

Definition at line 372 of file level.cpp.

◆ flagLevelChanged()

void bLevel::flagLevelChanged ( )

Definition at line 27 of file level.cpp.

Referenced by bLevel(), cmd_level::execute(), and bGame::newGame().

+ Here is the caller graph for this function:

◆ setGameTime() [1/2]

void bLevel::setGameTime ( int const  msPerGame)

new level or new game

Definition at line 43 of file level.cpp.

Referenced by cmd_go::execute(), and cmd_level::execute().

+ Here is the caller graph for this function:

◆ setGameTime() [2/2]

void bLevel::setGameTime ( int const  msPerGame,
int const  msIncrementPerMove 
)

Definition at line 62 of file level.cpp.

◆ setMoveTime() [1/3]

void bLevel::setMoveTime ( int const  msPerMove)

Definition at line 81 of file level.cpp.

Referenced by cmd_go::execute(), cmd_level::execute(), and cmd_st::execute().

+ Here is the caller graph for this function:

◆ setMoveTime() [2/3]

void bLevel::setMoveTime ( int const  msPerGame,
int const  nMoves 
)

Definition at line 103 of file level.cpp.

◆ setMoveTime() [3/3]

void bLevel::setMoveTime ( int const  msPerGame,
int const  nMoves,
int const  msIncrementPerMove 
)

Definition at line 123 of file level.cpp.

◆ setInfinite()

void bLevel::setInfinite ( )

Definition at line 32 of file level.cpp.

Referenced by cmd_go::execute().

+ Here is the caller graph for this function:

◆ setMateSearch()

void bLevel::setMateSearch ( depth_t const  d)

Definition at line 144 of file level.cpp.

Referenced by cmd_go::execute(), and cmd_fd::execute().

+ Here is the caller graph for this function:

◆ setMoves()

void bLevel::setMoves ( std::string  movelist)

◆ setNodes()

void bLevel::setNodes ( int64_t  n)

Definition at line 269 of file level.cpp.

Referenced by cmd_go::execute().

+ Here is the caller graph for this function:

◆ setPondering()

void bLevel::setPondering ( )

Definition at line 289 of file level.cpp.

Referenced by cmd_go::execute(), and cmd_hard::execute().

+ Here is the caller graph for this function:

◆ clearPondering()

void bLevel::clearPondering ( )

Definition at line 294 of file level.cpp.

Referenced by cmd_easy::execute().

+ Here is the caller graph for this function:

◆ isPondering()

bool bLevel::isPondering ( ) const

Definition at line 299 of file level.cpp.

◆ getType()

LevelType bLevel::getType ( ) const

Definition at line 274 of file level.cpp.

◆ setSearchDepth()

void bLevel::setSearchDepth ( depth_t const  d)

Definition at line 259 of file level.cpp.

◆ getSearchDepth()

depth_t bLevel::getSearchDepth ( ) const

Definition at line 279 of file level.cpp.

◆ setQSDepth()

void bLevel::setQSDepth ( depth_t const  d)
inline

Definition at line 85 of file level.h.

◆ getQSDepth()

depth_t bLevel::getQSDepth ( ) const
inline

Definition at line 86 of file level.h.

◆ setMaxDepth()

void bLevel::setMaxDepth ( depth_t const  d)

Definition at line 264 of file level.cpp.

◆ getMaxDepth()

depth_t bLevel::getMaxDepth ( ) const

Definition at line 284 of file level.cpp.

◆ setDepthCommand()

void bLevel::setDepthCommand ( depth_t const  d)

Definition at line 250 of file level.cpp.

Referenced by bGame::DoPerft(), cmd_go::execute(), cmd_sd::execute(), and main().

+ Here is the caller graph for this function:

◆ searchDepthReached()

bool bLevel::searchDepthReached ( depth_t const  d) const

Definition at line 306 of file level.cpp.

◆ qsDepthReached()

bool bLevel::qsDepthReached ( depth_t const  d) const

Definition at line 311 of file level.cpp.

◆ stoppingSearch()

bool bLevel::stoppingSearch ( long const  nTimeElapsed) const

Stop search required ?

Parameters
nTimeElapsedtime elapsed until now
Returns
true if need to stop search

stopping

aborting

avoid getting flagged

Definition at line 321 of file level.cpp.

Referenced by bSearchAlgorithm::CheckIfAbortingSearch().

+ Here is the caller graph for this function:

◆ stillTimeLeft()

bool bLevel::stillTimeLeft ( depth_t const  d,
long const  nTimeElapsed 
) const

Do we still have time to do another iteration ?

Parameters
dcurrent depth searched
nTimeElapsedtime elapsed until now
Returns
true if another iteration could be started

Definition at line 342 of file level.cpp.

◆ setRemainingTime()

void bLevel::setRemainingTime ( int const  msPerGame)

xboard issues time command to update available time

Definition at line 157 of file level.cpp.

Referenced by cmd_time::execute().

+ Here is the caller graph for this function:

◆ setMovePlayed()

void bLevel::setMovePlayed ( )

Definition at line 167 of file level.cpp.

Referenced by cmd_usermove::execute().

+ Here is the caller graph for this function:

◆ undoMovePlayed()

void bLevel::undoMovePlayed ( )

used for recalibrating time in case for undo move in xboard moves per period

Definition at line 179 of file level.cpp.