* Fixed bug of player handling if player left during sideboarding. Added player info to show if tournament player is in sideboarding state.

This commit is contained in:
LevelX2 2014-10-25 16:03:29 +02:00
parent 791cc828c4
commit 6db39452cd
4 changed files with 42 additions and 16 deletions

View file

@ -16,7 +16,7 @@ public enum TournamentPlayerState {
CANCELED ("Canceled"),
FINISHED ("Finished"); // winner or player in swiss style
private String text;
private final String text;
TournamentPlayerState(String text) {
this.text = text;

View file

@ -111,7 +111,11 @@ public abstract class TournamentSwiss extends TournamentImpl {
} else {
// player free round - add to bye players of this round
round.getPlayerByes().add(player1);
player1.setState(TournamentPlayerState.WAITING);
if (round.getRoundNumber() == getNumberRounds()) {
player1.setState(TournamentPlayerState.FINISHED);
} else {
player1.setState(TournamentPlayerState.WAITING);
}
player1.setStateInfo("Round Bye");
updateResults();
}