Cute Chess  0.1
tournamentplayer.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 TOURNAMENTPLAYER_H
19 #define TOURNAMENTPLAYER_H
20 
21 #include "playerbuilder.h"
22 #include "timecontrol.h"
23 
24 class OpeningBook;
25 
27 class LIB_EXPORT TournamentPlayer
28 {
29  public:
32  const TimeControl& timeControl,
33  const OpeningBook* book,
34  int bookDepth);
35 
37  const PlayerBuilder* builder() const;
39  QString name() const;
41  void setName(const QString& name);
43  const TimeControl& timeControl() const;
45  const OpeningBook* book() const;
47  int bookDepth() const;
52  int wins() const;
57  int draws() const;
62  int losses() const;
64  int score() const;
66  void addScore(int score);
71  int gamesFinished() const;
72 
73  private:
74  PlayerBuilder* m_builder;
75  TimeControl m_timeControl;
76  const OpeningBook* m_book;
77  int m_bookDepth;
78  int m_wins;
79  int m_draws;
80  int m_losses;
81 };
82 
83 #endif // TOURNAMENTPLAYER_H
A class for constructing new chess players.
Definition: playerbuilder.h:37
Time controls of a chess game.
Definition: timecontrol.h:34
A class for storing a player&#39;s tournament-specific details.
Definition: tournamentplayer.h:27
A collection of opening moves for chess.
Definition: openingbook.h:42