From 84794fe5c3442576175bda984e0e8092d20d0e80 Mon Sep 17 00:00:00 2001 From: Atsuyo-INSA Date: Thu, 7 Dec 2023 14:14:42 +0100 Subject: [PATCH] LB no float --- js/leaderboard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/leaderboard.js b/js/leaderboard.js index 6ba04e8..7ae29ee 100644 --- a/js/leaderboard.js +++ b/js/leaderboard.js @@ -54,7 +54,7 @@ class LeaderBoard { this.ctx.fillText(p.name, this.px+30, this.py+120+20*this.nbjoueur); this.ctx.fillText(p.kill, this.px+180, this.py+120+20*this.nbjoueur); this.ctx.fillText(p.death, this.px+200, this.py+120+20*this.nbjoueur); - this.ctx.fillText(p.kill/p.death, this.px+220, this.py+120+20*this.nbjoueur); + this.ctx.fillText(Math.round(10*p.kill/p.death)/10, this.px+220, this.py+120+20*this.nbjoueur); this.nbjoueur++ }