More improvements

This commit is contained in:
Andras Schmelczer 2026-06-11 21:33:08 +01:00
parent 3848e460cd
commit e3c44f775b
11 changed files with 908 additions and 233 deletions

View file

@ -49,6 +49,11 @@ export class Scoreboard {
this.declaFill.style.width = fraction(declaCount) + '%';
this.redFill.style.width = fraction(redCount) + '%';
const isMatchPoint = (count: number) =>
count / limit >= settings.matchPointScoreRatio;
this.declaFill.classList.toggle('match-point', isMatchPoint(declaCount));
this.redFill.classList.toggle('match-point', isMatchPoint(redCount));
this.declaScore.innerText = String(Math.round(declaCount));
this.redScore.innerText = String(Math.round(redCount));