X-Git-Url: http://winboard.nl/cgi-bin?p=capablanca.git;a=blobdiff_plain;f=lasker-2.2.3%2Fbots%2Fmamer%2FMamer.cc;h=e09cddf2599ffc5e7840bd59dcb8eec671cf2582;hp=ee10805f0160b5bfdf4e555d8a341dadae139fa6;hb=de64701702c2b4d4d951be0e77afeda5177bc494;hpb=0ff5591bb1fcb56b4ebf451eb30fb3c413eaad2d diff --git a/lasker-2.2.3/bots/mamer/Mamer.cc b/lasker-2.2.3/bots/mamer/Mamer.cc index ee10805..e09cddf 100644 --- a/lasker-2.2.3/bots/mamer/Mamer.cc +++ b/lasker-2.2.3/bots/mamer/Mamer.cc @@ -1207,7 +1207,7 @@ int Mamer::HandleGame(char *message) { 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 playerIter(t->playerList); playerIter.Reset(); @@ -1469,6 +1469,12 @@ void Mamer::BuildCommandList(void) { 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)); @@ -1516,7 +1522,7 @@ void Mamer::NextRound() { LinkListIter 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 gameIter(t->gameList); @@ -1532,7 +1538,7 @@ void Mamer::NextRound() { 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); }