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
25class OpeningBook;
26
28class LIB_EXPORT TournamentPlayer
29{
30 public:
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 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
int draws() const
Definition tournamentplayer.cpp:73
int score() const
Definition tournamentplayer.cpp:83
void setName(const QString &name)
Definition tournamentplayer.cpp:47
const PlayerBuilder * builder() const
Definition tournamentplayer.cpp:37
int bookDepth() const
Definition tournamentplayer.cpp:63
int wins() const
Definition tournamentplayer.cpp:68
int losses() const
Definition tournamentplayer.cpp:78
const OpeningBook * book() const
Definition tournamentplayer.cpp:58
void addScore(int score)
Definition tournamentplayer.cpp:88
const TimeControl & timeControl() const
Definition tournamentplayer.cpp:53
QString name() const
Definition tournamentplayer.cpp:42
TournamentPlayer(PlayerBuilder *builder, const TimeControl &timeControl, const OpeningBook *book, int bookDepth)
Definition tournamentplayer.cpp:22
int gamesFinished() const
Definition tournamentplayer.cpp:107