Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

Commit

Permalink
✨ Highlight the win rate card too, closes #77
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenein committed Jul 18, 2021
1 parent fa031af commit 480dbcd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "blitz-dashboard"
version = "0.10.1"
version = "0.10.2"
authors = ["Pavel Perestoronin <[email protected]>"]
edition = "2018"
resolver = "2"
Expand Down
2 changes: 1 addition & 1 deletion src/statistics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl ConfidenceInterval {

#[must_use]
pub fn default_wilson_score_interval(n_trials: i32, n_successes: i32) -> Self {
Self::wilson_score_interval(n_trials, n_successes, Z_80)
Self::wilson_score_interval(n_trials, n_successes, Z_90)
}

#[must_use]
Expand Down
3 changes: 2 additions & 1 deletion src/web/routes/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,12 @@ pub async fn get(
div.tile.is-ancestor {
@if stats_delta.battles != 0 {
div.tile."is-4".is-parent {
@let period_win_rate = ConfidenceInterval::default_wilson_score_interval(stats_delta.battles, stats_delta.wins);
div.tile.is-child.card {
header.card-header {
p.card-header-title { (icon_text("fas fa-percentage", "Победы")) }
}
div.card-content {
div.card-content.(partial_cmp_class(period_win_rate.partial_cmp(&total_win_rate))) {
(render_confidence_interval_level(stats_delta.battles, stats_delta.wins))
}
}
Expand Down

0 comments on commit 480dbcd

Please sign in to comment.