From 37ffa7347909dd06ec4764073725b026f30eeccb Mon Sep 17 00:00:00 2001 From: Didictateur Date: Sun, 30 Mar 2025 12:35:17 +0200 Subject: [PATCH] =?UTF-8?q?am=C3=A9lioration=20affichage=20pioche?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/game.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/game.ts b/src/game.ts index c3aeaa9..335e38b 100644 --- a/src/game.ts +++ b/src/game.ts @@ -569,7 +569,12 @@ export class Game { this.staticCtx.fillStyle = "#f070f0"; this.staticCtx.font = "40px garamond"; - this.staticCtx.fillText(this.deck.length().toString(), 507, 537); + let l = this.deck.length(); + if (l < 10) { + this.staticCtx.fillText(l.toString(), 517, 537); + } else { + this.staticCtx.fillText(l.toString(), 507, 537); + } } private drawResult(): void {