* Some minor changes to match / tournament table view.

This commit is contained in:
LevelX2 2014-11-02 12:11:51 +01:00
parent 146a41dcb8
commit 39d2551996

View file

@ -141,21 +141,19 @@ public class TableView implements Serializable {
this.controllerName += sb1.toString(); this.controllerName += sb1.toString();
StringBuilder infoText = new StringBuilder(); StringBuilder infoText = new StringBuilder();
StringBuilder stateText = new StringBuilder(table.getState().toString()); StringBuilder stateText = new StringBuilder(table.getState().toString());
infoText.append("Wins:").append(table.getTournament().getOptions().getMatchOptions().getWinsNeeded()).append(" "); infoText.append("Wins:").append(table.getTournament().getOptions().getMatchOptions().getWinsNeeded());
if (!table.getState().equals(TableState.WAITING)) { infoText.append(" Seats: ").append(table.getTournament().getPlayers().size()).append("/").append(table.getNumberOfSeats());
infoText.append("Seats: ").append(table.getTournament().getPlayers().size()).append("/").append(table.getNumberOfSeats());
}
switch (table.getState()) { switch (table.getState()) {
case WAITING: case WAITING:
stateText.append(" (").append(table.getTournament().getPlayers().size()).append("/").append(table.getNumberOfSeats()).append(")"); stateText.append(" (").append(table.getTournament().getPlayers().size()).append("/").append(table.getNumberOfSeats()).append(")");
if (!table.getTournament().getOptions().getPassword().isEmpty()) { if (!table.getTournament().getOptions().getPassword().isEmpty()) {
infoText.append(" PW"); stateText.append(" PW");
} }
case READY_TO_START: case READY_TO_START:
case STARTING: case STARTING:
infoText.append(" Timer: ").append(table.getTournament().getOptions().getMatchOptions().getMatchTimeLimit().toString());
if (table.getTournament().getOptions().getMatchOptions().getFreeMulligans() > 0) { if (table.getTournament().getOptions().getMatchOptions().getFreeMulligans() > 0) {
infoText.append(" Free Mul.: ").append(table.getTournament().getOptions().getMatchOptions().getFreeMulligans()); infoText.append(" Fr.Mul: ").append(table.getTournament().getOptions().getMatchOptions().getFreeMulligans());
} }
if (table.getTournament().getTournamentType().isLimited()) { if (table.getTournament().getTournamentType().isLimited()) {
infoText.append(" Constr. Time: ").append(table.getTournament().getOptions().getLimitedOptions().getConstructionTime()/60).append(" Min."); infoText.append(" Constr. Time: ").append(table.getTournament().getOptions().getLimitedOptions().getConstructionTime()/60).append(" Min.");