Belofte  version 2.1.5
A promising chess program using the UCI or Winboard interface
bestmoveinfo.h
Go to the documentation of this file.
1 /**
2  * @file bestmoveinfo.h
3  * @see Part of belofte - A Promising Chess Program
4  * @copyright SPDX-License-Identifier: GPL-2.0-only
5  * @author Yves De Billoëz
6  */
7 
8 #if !defined(BESTMOVEINFO_H)
9 #define BESTMOVEINFO_H
10 
11 // --------------------------------------------------------------------
12 
14 public:
15  bBestMoveInfo();
16  explicit bBestMoveInfo(bScore const _score);
17  explicit bBestMoveInfo(bScore const _score, movenum_t const _moveid, move_t const _mt);
18  bBestMoveInfo(bBestMoveInfo const& bmi);
19  bBestMoveInfo(bBestMoveInfo&& bmi) noexcept;
21 
23  bBestMoveInfo& operator=(bBestMoveInfo&& bmi) noexcept;
24  bBestMoveInfo& operator=(bScore const& sc) noexcept;
25  bBestMoveInfo& operator=(bScore&& sc) noexcept;
26  bBestMoveInfo& operator++(); /// indicate more moves evaluated
27 
28  bScore getScore() const { return m_score; }
29  bScore getRealScore() const { return belofte::realScore(m_score); }
30  void setScore(bScore const& _score) { m_score = _score; }
31  void setScore(bBestMoveInfo const& _bmi) { m_score = _bmi.getScore(); }
32  movenum_t getMoveId() const { return m_moveid; }
33  void setMoveId(movenum_t const _moveid) { m_moveid = _moveid; }
34  move_t getMoveT() const { return m_movet; }
35  void setMoveT(move_t const mt) { m_movet = mt; }
36 
37 private:
38  bScore m_score = SCORE_UNDEFINED;
39  movenum_t m_moveid = 0;
40  move_t m_movet = 0;
41 };
42 
43 #endif // defined BESTMOVEINFO_H
44 
45 // eof
uint_fast16_t movenum_t
moveflags (high order word) & basicmove (low order word)
Definition: belofte.h:103
int_fast16_t bScore
used to return id of move in movelist
Definition: belofte.h:104
uint32_t move_t
moveflags: bitfield
Definition: belofte.h:101
bBestMoveInfo & operator++()
bScore getScore() const
indicate more moves evaluated
Definition: bestmoveinfo.h:28
void setScore(bBestMoveInfo const &_bmi)
Definition: bestmoveinfo.h:31
void setMoveT(move_t const mt)
Definition: bestmoveinfo.h:35
void setScore(bScore const &_score)
Definition: bestmoveinfo.h:30
move_t getMoveT() const
Definition: bestmoveinfo.h:34
bScore getRealScore() const
Definition: bestmoveinfo.h:29
movenum_t getMoveId() const
Definition: bestmoveinfo.h:32
void setMoveId(movenum_t const _moveid)
Definition: bestmoveinfo.h:33
bBestMoveInfo & operator=(bBestMoveInfo const &bmi)
constexpr bScore SCORE_UNDEFINED
Definition: eval.h:20
bScore realScore(bScore const sc)
Definition: eval.cpp:23