if(f = fopen(appData.tourneyFile, "r")) {
ParseArgsFromFile(f); // make sure tourney parmeters re known
fclose(f);
+ appData.clockMode = TRUE;
+ SetGNUMode();
} else appData.tourneyFile[0] = NULLCHAR; // for now ignore bad tourney file
}
MatchEvent(TRUE);
if(cps == &pairing && sscanf(message, "%d-%d", &savedWhitePlayer, &savedBlackPlayer) == 2) {
// [HGM] pairing: Mega-hack! Pairing engine also uses this routine (so it could give other WB commands).
- if(savedWhitePlayer == 0 || savedBlackPlayer == 0) return;
+ if(savedWhitePlayer == 0 || savedBlackPlayer == 0) {
+ DisplayError(_("Invalid pairing from pairing engine"), 0);
+ return;
+ }
pairingReceived = 1;
NextMatchGame();
return; // Skim the pairing messages here.
*whitePlayer = curRound;
*blackPlayer = nPlayers - 1; // this is the 'bye' when nPlayer is odd
} else {
- *whitePlayer = curRound - pairingsPerRound + curPairing;
+ *whitePlayer = curRound - (nPlayers-1)/2 + curPairing;
if(*whitePlayer < 0) *whitePlayer += nPlayers-1+(nPlayers&1);
- *blackPlayer = curRound + pairingsPerRound - curPairing;
+ *blackPlayer = curRound + (nPlayers-1)/2 - curPairing;
if(*blackPlayer >= nPlayers-1+(nPlayers&1)) *blackPlayer -= nPlayers-1+(nPlayers&1);
}
} else if(appData.tourneyType > 0) {