protected String createGameStartMessage() { StringBuilder sb = new StringBuilder(); sb.append("<br/><b>Match score:</b><br/>"); for (MatchPlayer mp : this.getPlayers()) { sb.append(" ").append(mp.getPlayer().getLogName()); sb.append(" - ").append(mp.getWins()).append(mp.getWins() == 1 ? " win" : " wins"); if (mp.hasQuit()) { sb.append(" QUITTED"); } sb.append("<br/>"); if (mp.getDeck() != null) { sb.append("DeckHash: ").append(mp.getDeck().getDeckHashCode()).append("<br/>"); } } if (getDraws() > 0) { sb.append(" Draws: ").append(getDraws()).append("<br/>"); } if (options.getRange() != null) { sb.append(" Range: ").append(options.getRange().toString()).append("<br/>"); } sb.append("<br/>").append("Match is ").append(this.getOptions().isRated() ? "" : "not ").append("rated<br/>"); sb.append("You have to win ").append(this.getWinsNeeded()).append(this.getWinsNeeded() == 1 ? " game" : " games").append(" to win the complete match<br/>"); sb.append("<br/>Game has started<br/><br/>"); return sb.toString(); }
this.endTime = table.getTournament().getEndTime(); this.replayAvailable = false; this.rated = table.getTournament().getOptions().getMatchOptions().isRated();
this.endTime = match.getEndTime(); this.replayAvailable = match.isReplayAvailable(); this.rated = match.getOptions().isRated();
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_WINS + versionStr, Integer.toString(options.getWinsNeeded())); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_ROLLBACK_TURNS_ALLOWED + versionStr, options.isRollbackTurnsAllowed() ? "Yes" : "No"); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_RATED + versionStr, options.isRated() ? "Yes" : "No"); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_NUMBER_OF_FREE_MULLIGANS + versionStr, Integer.toString(options.getFreeMulligans())); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TABLE_DECK_FILE + versionStr, deckFile);
PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_PLANE_CHASE + versionStr, (tOptions.isPlaneChase() ? "Yes" : "No")); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_ALLOW_ROLLBACKS + versionStr, (tOptions.getMatchOptions().isRollbackTurnsAllowed() ? "Yes" : "No")); PreferencesDialog.saveValue(PreferencesDialog.KEY_NEW_TOURNAMENT_RATED + versionStr, (tOptions.getMatchOptions().isRated() ? "Yes" : "No"));
this.minimumRating = Integer.toString(table.getMatch().getOptions().getMinimumRating()); this.limited = table.getMatch().getOptions().isLimited(); this.rated = table.getMatch().getOptions().isRated(); this.passworded = !table.getMatch().getOptions().getPassword().isEmpty(); this.spectatorsAllowed = table.getMatch().getOptions().isSpectatorsAllowed(); this.minimumRating = Integer.toString(table.getTournament().getOptions().getMinimumRating()); this.limited = table.getTournament().getOptions().getMatchOptions().isLimited(); this.rated = table.getTournament().getOptions().getMatchOptions().isRated(); this.passworded = !table.getTournament().getOptions().getPassword().isEmpty(); this.spectatorsAllowed = table.getTournament().getOptions().isWatchingAllowed();
public ResultProtos.MatchOptionsProto toProto() { ResultProtos.MatchOptionsProto.Builder builder = ResultProtos.MatchOptionsProto.newBuilder() .setName(this.getName()) .setLimited(this.isLimited()) .setRated(this.isRated()) .setWinsNeeded(this.getWinsNeeded()); ResultProtos.SkillLevel skillLevel = ResultProtos.SkillLevel.BEGINNER; switch (this.getSkillLevel()) { case BEGINNER: skillLevel = ResultProtos.SkillLevel.BEGINNER; break; case CASUAL: skillLevel = ResultProtos.SkillLevel.CASUAL; break; case SERIOUS: skillLevel = ResultProtos.SkillLevel.SERIOUS; break; } builder.setSkillLevel(skillLevel); return builder.build(); } }