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#include "board/side.h"
25
26class OpeningBook;
27
29class LIB_EXPORT TournamentPlayer
30{
31 public:
34 const TimeControl& timeControl,
35 const OpeningBook* book,
36 int bookDepth);
37
39 const PlayerBuilder* builder() const;
41 QString name() const;
43 void setName(const QString& name);
45 const TimeControl& timeControl() const;
47 const OpeningBook* book() const;
49 int bookDepth() const;
54 int wins() const;
59 int draws() const;
64 int losses() const;
69 int whiteWins() const;
74 int whiteDraws() const;
79 int whiteLosses() const;
84 int blackWins() const;
89 int blackDraws() const;
94 int blackLosses() const;
96 int score() const;
98 void addScore(Chess::Side side, int score);
103 int gamesFinished() const;
104
105 private:
106 PlayerBuilder* m_builder;
107 TimeControl m_timeControl;
108 const OpeningBook* m_book;
109 int m_bookDepth;
110 int m_wins;
111 int m_draws;
112 int m_losses;
113 int m_whiteWins;
114 int m_whiteDraws;
115 int m_whiteLosses;
116};
117
118#endif // TOURNAMENTPLAYER_H
The side or color of a chess player.
Definition: side.h:36
A collection of opening moves for chess.
Definition: openingbook.h:44
A class for constructing new chess players.
Definition: playerbuilder.h:39
Time controls of a chess game.
Definition: timecontrol.h:36
A class for storing a player's tournament-specific details.
Definition: tournamentplayer.h:30