if (tournament.getTournamentType().isLimited()) { Map<String,Integer> setInfo = new LinkedHashMap<>(); for (String setCode: options.getLimitedOptions().getSetCodes()) {
public TournamentView(Tournament tournament) { tournamentName = tournament.getOptions().getName(); StringBuilder typeText = new StringBuilder(tournament.getOptions().getTournamentType()); if (!tournament.getTournamentType().isLimited()) { typeText.append(" / ").append(tournament.getOptions().getMatchOptions().getDeckType()); } if (tournament.getNumberRounds() > 0) { typeText.append(' ').append(tournament.getNumberRounds()).append(" rounds"); } tournamentType = typeText.toString(); startTime = tournament.getStartTime(); endTime = tournament.getEndTime(); stepStartTime = tournament.getStepStartTime(); constructionTime = tournament.getOptions().getLimitedOptions().getConstructionTime(); watchingAllowed = tournament.getOptions().isWatchingAllowed(); serverTime = new Date(); tournamentState = tournament.getTournamentState(); if (tournament.getTournamentState().equals("Drafting") && tournament.getDraft() != null) { runningInfo = "booster/card: " + tournament.getDraft().getBoosterNum() + '/' + (tournament.getDraft().getCardNum() -1); } else { runningInfo = ""; } for (TournamentPlayer player: tournament.getPlayers()) { players.add(new TournamentPlayerView(player)); } Collections.sort(players); for (Round round: tournament.getRounds()) { rounds.add(new RoundView(round)); } }
public TournamentTypeView(TournamentType tournamentType) { this.name = tournamentType.getName(); this.minPlayers = tournamentType.getMinPlayers(); this.maxPlayers = tournamentType.getMaxPlayers(); this.numBoosters = tournamentType.getNumBoosters(); this.draft = tournamentType.isDraft(); this.limited = tournamentType.isLimited(); this.cubeBooster = tournamentType.isCubeBooster(); this.elimination = tournamentType.isElimination(); this.random = tournamentType.isRandom(); this.richMan = tournamentType.isRichMan(); }
if (!table.getTournament().getTournamentType().isLimited()) { if (deckList != null) { deck = Deck.load(deckList, false, false);
infoText.append(" Fr.Mul: ").append(table.getTournament().getOptions().getMatchOptions().getFreeMulligans()); if (table.getTournament().getTournamentType().isLimited()) { infoText.append(" Constr.: ").append(table.getTournament().getOptions().getLimitedOptions().getConstructionTime() / 60).append(" Min.");