Add allowed quit ratio option to match option and tourney option.

This commit is contained in:
Me Car 2016-01-30 23:17:32 +09:00
parent ef3fbffe11
commit 284c36b756
16 changed files with 292 additions and 74 deletions

View file

@ -62,6 +62,7 @@ public class TableView implements Serializable {
private boolean isTournament;
private List<SeatView> seats = new ArrayList<>();
private List<UUID> games = new ArrayList<>();
private final String quitRatio;
public TableView(Table table) {
this.tableId = table.getId();
@ -130,6 +131,7 @@ public class TableView implements Serializable {
}
this.additionalInfo = addInfo.toString();
this.skillLevel = table.getMatch().getOptions().getSkillLevel();
this.quitRatio = Integer.toString(table.getMatch().getOptions().getQuitRatio());
} else {
// TOURNAMENT
if (table.getTournament().getOptions().getNumberRounds() > 0) {
@ -176,6 +178,7 @@ public class TableView implements Serializable {
this.tableStateText = stateText.toString();
this.deckType = table.getDeckType() + " " + table.getTournament().getBoosterInfo() + (tableNameInfo != null ? tableNameInfo : "");
this.skillLevel = table.getTournament().getOptions().getMatchOptions().getSkillLevel();
this.quitRatio = Integer.toString(table.getTournament().getOptions().getQuitRatio());
}
}
@ -230,4 +233,7 @@ public class TableView implements Serializable {
return skillLevel;
}
public String getQuitRatio() {
return quitRatio;
}
}

View file

@ -40,14 +40,19 @@ public class UsersView implements Serializable {
private final String flagName;
private final String userName;
private final String matchHistory;
private final String matchQuitRatio;
private final String tourneyHistory;
private final String tourneyQuitRatio;
private final String infoGames;
private final String infoPing;
public UsersView(String flagName, String userName, String matchHistory, String tourneyHistory, String infoGames, String infoPing) {
public UsersView(String flagName, String userName, String matchHistory, int matchQuitRatio,
String tourneyHistory, int tourneyQuitRatio, String infoGames, String infoPing) {
this.flagName = flagName;
this.matchHistory = matchHistory;
this.matchQuitRatio = Integer.toString(matchQuitRatio);
this.tourneyHistory = tourneyHistory;
this.tourneyQuitRatio = Integer.toString(tourneyQuitRatio);
this.userName = userName;
this.infoGames = infoGames;
this.infoPing = infoPing;
@ -65,10 +70,18 @@ public class UsersView implements Serializable {
return matchHistory;
}
public String getMatchQuitRatio() {
return matchQuitRatio;
}
public String getTourneyHistory() {
return tourneyHistory;
}
public String getTourneyQuitRatio() {
return tourneyQuitRatio;
}
public String getInfoGames() {
return infoGames;
}