continue;
}
moreGames = t->SetGameResult(user1, user2, result_code); //- SetGameResult deletes the game for us
- if(moreGames == 2) {
+ if(moreGames == 2 && !t->IsPaused()) {
moreRounds = (t->GetRoundsRemaining());
LinkListIter<TourneyPlayers> playerIter(t->playerList);
playerIter.Reset();
return 0;
} //Check for valid tourney is done in CommandEntry::JoinTourney
- return_from_AddPlayer = t->AddPlayer(player, ratings[t->GetVariant()], 0.0);
+ return_from_AddPlayer = t->AddPlayer(player, ratings[t->GetVariant()], p->floatValue); // [HGM] use score to signal att/join
printf("ret = %d\n", return_from_AddPlayer);
TellUser(JoinedTourney, player, return_from_AddPlayer);
if(return_from_AddPlayer == 1)
commandList.Append(new Command("open", "ot", DIRECTOR, "Opens the tournament to players.",
"d", (USERFP)&Mamer::OpenTourney));
+ commandList.Append(new Command("pause", "pa", DIRECTOR, "Supresses start of new round.",
+ "d", (USERFP)&Mamer::PauseTourney));
+
+ commandList.Append(new Command("resume", "re", DIRECTOR, "Resumes a paused tournament.",
+ "d", (USERFP)&Mamer::ResumeTourney));
+
commandList.Append(new Command("setcommandlevel", "setcl", VICE, "Set the level required to execute a command.",
"wd", (USERFP)&Mamer::SetCommandLevel));
LinkListIter<Tourney> tourneyIter(tourneyList);
tourneyIter.Reset();
while((t = tourneyIter.Next())) {
- if(t->GetStatus() != CLOSED) continue;
+ if(t->GetStatus() != CLOSED || t->IsPaused()) continue;
moreRounds = (t->GetRoundsRemaining());
moreGames = 0;
LinkListIter<Game> gameIter(t->gameList);
if(madeMoreGames)
t->TellThemWhoTheyPlay();
else { // tourney over!
- cerr << "Coulnd't make any more games. End of Tourney. From Next Round" << endl;
+ cerr << "Couldn't make any more games. End of Tourney. From Next Round" << endl;
AnnounceTourneyEnd(t);
savePlayerData(t);
}