Cute Chess  0.1
moveevaluation.h
1 /*
2  This file is part of Cute Chess.
3 
4  Cute Chess is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  Cute Chess is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef MOVEEVALUATION_H
19 #define MOVEEVALUATION_H
20 
21 #include <QString>
22 #include <QMetaType>
23 
34 class LIB_EXPORT MoveEvaluation
35 {
36  public:
38  static const int NULL_SCORE = 0xFFFFFFF;
39 
42 
44  bool operator==(const MoveEvaluation& other) const;
46  bool operator!=(const MoveEvaluation& other) const;
47 
49  bool isEmpty() const;
50 
52  bool isBookEval() const;
53 
58  int depth() const;
59 
64  int selectiveDepth() const;
65 
70  int score() const;
71 
73  int time() const;
74 
79  quint64 nodeCount() const;
80 
85  quint64 nps() const;
86 
91  quint64 tbHits() const;
92 
97  int hashUsage() const;
98 
103  int ponderhitRate() const;
104 
106  QString ponderMove() const;
107 
114  QString pv() const;
115 
120  int pvNumber() const;
121 
122 
124  void clear();
125 
127  void setBookEval(bool isBookEval);
128 
130  void setDepth(int depth);
131 
133  void setSelectiveDepth(int depth);
134 
136  void setScore(int score);
137 
139  void setTime(int time);
140 
142  void setNodeCount(quint64 nodeCount);
143 
145  void setNps(quint64 nps);
146 
148  void setTbHits(quint64 tbHits);
149 
151  void setHashUsage(int hashUsage);
152 
154  void setPonderhitRate(int rate);
155 
157  void setPonderMove(const QString& san);
158 
160  void setPv(const QString& pv);
161 
163  void setPvNumber(int number);
164 
166  void merge(const MoveEvaluation& other);
167 
168  private:
169  bool m_isBookEval;
170  int m_depth;
171  int m_selDepth;
172  int m_score;
173  int m_time;
174  int m_pvNumber;
175  int m_hashUsage;
176  int m_ponderhitRate;
177  quint64 m_nodeCount;
178  quint64 m_nps;
179  quint64 m_tbHits;
180  QString m_pv;
181  QString m_ponderMove;
182 };
183 
184 Q_DECLARE_METATYPE(MoveEvaluation)
185 
186 #endif // MOVEEVALUATION_H
Evaluation data for a chess move.
Definition: moveevaluation.h:34