Cute Chess 0.1
gauntlettournament.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 GAUNTLETTOURNAMENT_H
20#define GAUNTLETTOURNAMENT_H
21
22#include "tournament.h"
23
30class LIB_EXPORT GauntletTournament : public Tournament
31{
32 Q_OBJECT
33
34 public:
36 explicit GauntletTournament(GameManager* gameManager,
37 QObject *parent = nullptr);
38 // Inherited from Tournament
39 virtual QString type() const;
40
41 protected:
42 // Inherited from Tournament
43 virtual void onGameAboutToStart(ChessGame* game,
44 const PlayerBuilder* white,
45 const PlayerBuilder* black);
46 virtual void initializePairing();
47 virtual int gamesPerCycle() const;
48 virtual TournamentPair* nextPair(int gameNumber);
49 virtual bool hasGauntletRatingsOrder() const;
50
51 private:
52 int m_currentPlayer;
53 int m_opponent;
54};
55
56#endif // GAUNTLETTOURNAMENT_H
Definition: chessgame.h:39
A class for managing chess games and players.
Definition: gamemanager.h:41
Gauntlet type chess tournament.
Definition: gauntlettournament.h:31
A class for constructing new chess players.
Definition: playerbuilder.h:39
A single encounter in a tournament.
Definition: tournamentpair.h:32
Base class for chess tournaments.
Definition: tournament.h:45
virtual QString type() const =0
virtual void initializePairing()=0
virtual TournamentPair * nextPair(int gameNumber)=0
virtual bool hasGauntletRatingsOrder() const
Definition: tournament.cpp:368
virtual void onGameAboutToStart(ChessGame *game, const PlayerBuilder *white, const PlayerBuilder *black)
Definition: tournament.cpp:463
virtual int gamesPerCycle() const =0