|
Cute Chess
0.1
|
Gauntlet type chess tournament. More...
#include <gauntlettournament.h>
Protected Member Functions | |
| virtual int | gamesPerCycle () const |
| virtual bool | hasGauntletRatingsOrder () const |
| virtual void | initializePairing () |
| virtual TournamentPair * | nextPair (int gameNumber) |
| virtual void | onGameAboutToStart (ChessGame *game, const PlayerBuilder *white, const PlayerBuilder *black) |
Protected Member Functions inherited from Tournament | |
| virtual void | addScore (int player, Chess::Side side, int score) |
| virtual bool | areAllGamesFinished () const |
| TournamentPair * | currentPair () const |
| int | gamesInProgress () const |
| virtual void | onFinished () |
| TournamentPair * | pair (int player1, int player2) |
| int | playerIndex (ChessGame *game, Chess::Side side) const |
| void | setCurrentRound (int round) |
| void | startGame (TournamentPair *pair) |
Additional Inherited Members | |
Public Types inherited from Tournament | |
| enum | OpeningPolicy { DefaultPolicy, EncounterPolicy, RoundPolicy } |
Public Slots inherited from Tournament | |
| void | start () |
| void | stop () |
Signals inherited from Tournament | |
| void | finished () |
| void | gameFinished (ChessGame *game, int number, int whiteIndex, int blackIndex) |
| void | gameStarted (ChessGame *game, int number, int whiteIndex, int blackIndex) |
Static Public Attributes inherited from Tournament | |
| static constexpr auto | c_defaultFormat = "Rank,Name,Elo,Error,Games,Score,DScore" |
Gauntlet type chess tournament.
In a Gauntlet tournament the first participant plays against all the others.
|
explicit |
Creates a new Gauntlet tournament.
|
protectedvirtual |
Returns the number of games in one tournament cycle.
The gamesPerEncounter() and roundMultiplier() values must not affect the number of games per cycle.
Implements Tournament.
|
protectedvirtual |
Returns true if Gauntlet ordering is used for the ratings table (ie. first engine always at the top and the rest ordered by Elo); otherwise returns false.
The default implementation always returns false.
Reimplemented from Tournament.
|
protectedvirtual |
Initializes the pairings for the tournament.
Subclasses that implement this member function should prepare their data so that the nextPair() function can be called immediately afterwards.
Implements Tournament.
|
protectedvirtual |
Returns the pair of players for the next game.
The pair's first element is the white player's index number and the second element is the black player's index number.
Subclasses that implement this member function should call setCurrentRound() to increase the round when needed. Subclasses should also alternate the colors when needed, to make the tournament as fair as possible.
Sublasses can return (-1, -1) if the next game should not be started yet.
Implements Tournament.
|
protectedvirtual |
This member function is called by startGame() right before the game is actually started.
The default implementation does nothing.
Reimplemented from Tournament.
|
virtual |
Returns the tournament type (eg. "round-robin" or "gauntlet").
Implements Tournament.
1.8.14