From 9a5871fcd58ee5af57f0ae153085d958ec0b649a Mon Sep 17 00:00:00 2001 From: Andrey Ozornin Date: Wed, 28 Aug 2024 17:40:09 +0200 Subject: [PATCH] fix endgame condition --- src/screens/match/scoreboard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screens/match/scoreboard.ts b/src/screens/match/scoreboard.ts index 9d60900..9f044e1 100644 --- a/src/screens/match/scoreboard.ts +++ b/src/screens/match/scoreboard.ts @@ -30,7 +30,7 @@ export class ScoreBoard { increment(player: 'p1' | 'p2') { this[player]++ - if (this[player] > this.pointsToWin) { + if (this[player] >= this.pointsToWin) { this.endGame() } }