mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 19:59:54 -08:00
* 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:
parent
791cc828c4
commit
6db39452cd
4 changed files with 42 additions and 16 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue