fix analysis near end floating point
This commit is contained in:
parent
454d3817da
commit
0ff0b1110d
|
@ -26,7 +26,7 @@ private[analyse] final class AdvantageChart(advices: InfoAdvices) {
|
|||
case (_, Some(mate)) ⇒ Json.arr(move(info, advice), {
|
||||
val mateDelta = math.abs(mate.toFloat / 100)
|
||||
val whiteWins = info.color.fold(mate < 0, mate > 0)
|
||||
scale(whiteWins.fold(max - mateDelta, mateDelta - max))
|
||||
scale(whiteWins.fold(max - mateDelta, mateDelta - max)).toString
|
||||
})
|
||||
case _ ⇒ Json.arr(move(info, none), scale(0))
|
||||
}
|
||||
|
|
3
todo
3
todo
|
@ -60,8 +60,7 @@ the forum search user:mephostophilis returns no result
|
|||
check team average elo http://en.lichess.org/inbox/benuegti#bottom
|
||||
if game ends during move -> bug
|
||||
LilaError['[analysis] fred65 already analyses ueogn4fr, won't process ueogn4fr']
|
||||
unload event http://en.lichess.org/forum/redirect/post/lnsqfhli
|
||||
-> only rated games
|
||||
challenge friends
|
||||
|
||||
---
|
||||
|
||||
|
|
Loading…
Reference in a new issue