Skip to content

Commit

Permalink
web: Show all player achievements
Browse files Browse the repository at this point in the history
  • Loading branch information
schneefux committed Dec 11, 2023
1 parent 6594016 commit 379d35d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions web/components/player/player-percentiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default defineComponent({
const duoZ = (props.player.duoVictories - duoMu) / duoSigma
// TODO create an endpoint?
const allAchievements = [{
const achievements = [{
metric: i18n.t('metric.highestTrophies'),
percentile: ztable(trophiesZ),
}, {
Expand All @@ -86,10 +86,6 @@ export default defineComponent({
percentile: ztable(duoZ),
}].sort((a1, a2) => a2.percentile - a1.percentile)
const goodAchievements = allAchievements
.filter(a => a.percentile >= 0.5)
const achievements = goodAchievements.length == 0 ? allAchievements.slice(0, 1) : goodAchievements
function formatPercentile(p: number): string {
let base = 10
if (p >= 0.95) {
Expand Down

0 comments on commit 379d35d

Please sign in to comment.