Cute Chess  0.1
gameadjudicator.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 GAMEADJUDICATOR_H
19 #define GAMEADJUDICATOR_H
20 
21 #include "board/result.h"
22 namespace Chess { class Board; }
23 class MoveEvaluation;
24 
31 class LIB_EXPORT GameAdjudicator
32 {
33  public:
40 
49  void setDrawThreshold(int moveNumber, int moveCount, int score);
58  void setResignThreshold(int moveCount, int score);
65  void setTablebaseAdjudication(bool enable);
66 
76  void addEval(const Chess::Board* board, const MoveEvaluation& eval);
78  void resetDrawMoveCount();
85  Chess::Result result() const;
86 
87  private:
88  int m_drawMoveNum;
89  int m_drawMoveCount;
90  int m_drawScore;
91  int m_drawScoreCount;
92  int m_resignMoveCount;
93  int m_resignScore;
94  int m_resignScoreCount[2];
95  bool m_tbEnabled;
96  Chess::Result m_result;
97 };
98 
99 #endif // GAMEADJUDICATOR_H
Evaluation data for a chess move.
Definition: moveevaluation.h:34
An internal chessboard class.
Definition: board.h:56
Definition: boardscene.h:28
The result of a chess game.
Definition: result.h:33
A class for adjudicating chess games.
Definition: gameadjudicator.h:31