Add rating to the client (#1498)

This commit is contained in:
Quercitron 2016-05-17 17:27:43 +03:00
parent 972d59aa37
commit c781728b97
16 changed files with 234 additions and 52 deletions

View file

@ -431,7 +431,8 @@ public abstract class MatchImpl implements Match {
if (getDraws() > 0) {
sb.append(" Draws: ").append(getDraws()).append("<br/>");
}
sb.append("<br/>").append("You have to win ").append(this.getWinsNeeded()).append(this.getWinsNeeded() == 1 ? " game" : " games").append(" to win the complete match<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();
}

View file

@ -195,7 +195,10 @@ public class UserData implements Serializable {
if (UserGroup.COMPUTER.equals(this.groupId)) {
return "";
}
return "Matches: " + this.matchHistory + " (" + this.matchQuitRatio + "%) Tourneys: " + this.tourneyHistory + " (" + this.tourneyQuitRatio + "%)";
// todo: add preference to hide rating?
return "Matches: " + this.matchHistory + " (" + this.matchQuitRatio + "%), Tourneys: " + this.tourneyHistory + " (" + this.tourneyQuitRatio + "%)"
+ ", Constructed Rating: " + getConstructedRating()
+ ", Limited Rating: " + getLimitedRating();
}
public void setMatchHistory(String history) {