Cute Chess  0.1
tournamentplayer.h
1 /*
2  This file is part of Cute Chess.
3  Copyright (C) 2008-2018 Cute Chess authors
4 
5  Cute Chess is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  Cute Chess is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef TOURNAMENTPLAYER_H
20 #define TOURNAMENTPLAYER_H
21 
22 #include "playerbuilder.h"
23 #include "timecontrol.h"
24 
25 class OpeningBook;
26 
28 class LIB_EXPORT TournamentPlayer
29 {
30  public:
33  const TimeControl& timeControl,
34  const OpeningBook* book,
35  int bookDepth);
36 
38  const PlayerBuilder* builder() const;
40  QString name() const;
42  void setName(const QString& name);
44  const TimeControl& timeControl() const;
46  const OpeningBook* book() const;
48  int bookDepth() const;
53  int wins() const;
58  int draws() const;
63  int losses() const;
65  int score() const;
67  void addScore(int score);
72  int gamesFinished() const;
73 
74  private:
75  PlayerBuilder* m_builder;
76  TimeControl m_timeControl;
77  const OpeningBook* m_book;
78  int m_bookDepth;
79  int m_wins;
80  int m_draws;
81  int m_losses;
82 };
83 
84 #endif // TOURNAMENTPLAYER_H
A class for constructing new chess players.
Definition: playerbuilder.h:38
Time controls of a chess game.
Definition: timecontrol.h:35
A class for storing a player&#39;s tournament-specific details.
Definition: tournamentplayer.h:28
A collection of opening moves for chess.
Definition: openingbook.h:43