double RD when showing ratings

This commit is contained in:
Thibault Duplessis 2014-01-02 23:31:53 +01:00
parent ad14934068
commit f25ac86eec
4 changed files with 6 additions and 6 deletions

View file

@ -2,7 +2,7 @@
<div class="title">
<span class="user_link @isOnline(u.id).fold("online", "offline")">
<strong title="Glicko rating">@u.rating</strong>
<small title="Glicko rating deviation">±@u.perfs.global.glicko.intDeviation</small>
<small title="Glicko rating deviation">±@u.perfs.global.glicko.intDeviationDoubled</small>
@showProgress(u.progress)
@u.count.game.localize @trans.games()
</span>

View file

@ -14,7 +14,7 @@
case ((name, perf), i) => {
<div class="sub_ratings @{ (i == 0 || i == 2 || i == 5) ?? "sep" }" title="@perfTitle(name)">
<h3>@name.toUpperCase</h3>
<strong title="Glicko rating">@perf.glicko.intRating</strong><small title="Glicko rating deviation"> ±@perf.glicko.intDeviation</small> / <span title="Number of games played">@perf.nb.localize @trans.games()</span>
<strong title="Glicko rating">@perf.glicko.intRating</strong><small title="Glicko rating deviation"> ±@perf.glicko.intDeviationDoubled</small> / <span title="Number of games played">@perf.nb.localize @trans.games()</span>
</div>
}
}
@ -37,7 +37,7 @@ evenMoreJs = evenMoreJs) {
}
<div class="icon status @{isOnline(u.id).??("connected")}"></div>
<h1 class="lichess_title">@u.username</h1>
<span class="rating">RATING <strong title="Glicko rating">@u.rating</strong><small title="Glicko rating deviation"> ±@u.perfs.global.glicko.intDeviation</small></span>
<span class="rating">RATING <strong title="Glicko rating">@u.rating</strong><small title="Glicko rating deviation"> ±@u.perfs.global.glicko.intDeviationDoubled</small></span>
@showProgress(u.progress)
@info.rank.map { r =>
<span class="rank" title="@trans.rank()">RANK <strong>@r._1.localize</strong> / @{r._2/1000}k</span>

View file

@ -11,6 +11,7 @@ case class Glicko(
def intRating = rating.toInt
def intDeviation = deviation.toInt
def intDeviationDoubled = (deviation * 2).toInt
def interval = (rating - deviation * 2).toInt -> (rating + deviation * 2).toInt
@ -22,8 +23,8 @@ case object Glicko {
val default = Glicko(1500d, 350d, 0.06d)
def range(rating: Double, deviation: Double) = (
rating - deviation,
rating + deviation
rating - (deviation * 2),
rating + (deviation * 2)
)
private def GlickoBSONHandler = new BSON[Glicko] {

1
todo
View file

@ -105,7 +105,6 @@ automatic ai cheat detection is broken
time pie chart colors http://en.lichess.org/52ede6hu/stats
zindex issue https://github.com/ornicar/lila/issues/57
full page recent forum posts
fix RD in plus-minus (should double)
deploy
------