score: whitespace

master
Rob Pilling 2025-04-28 20:38:53 +01:00
parent 31073c29f1
commit 7674d601aa
1 changed files with 9 additions and 9 deletions

View File

@ -73,16 +73,16 @@ function setupInputWatchers(init) {
handleInput(1);
}
} else {
// long press except if we have the menu opened or we are in the emulator (that doesn't
// long press except if we have the menu opened or we are in the emulator (that doesn't
// seem to support long press events)
if (e.type === 2 || settingsMenuOpened || process.env.BOARD === 'EMSCRIPTEN2') {
handleInput(2);
} else {
let p = null;
if (matchWon(0)) p = 0;
else if (matchWon(1)) p = 1;
// display full instructions if there is space available, or brief ones otherwise
if (p === null) {
drawInitialMsg();
@ -213,8 +213,8 @@ function tiebreakWon(set, player) {
let p2Score = scores[set][3+~~!player];
// reachedMaxScore || (winScoreReached && isTwoAhead);
return (settings.maxScoreTiebreakEnableMaxScore && pScore >= tiebreakMaxScore()) ||
((pScore >= settings.maxScoreTiebreakWinScore) &&
return (settings.maxScoreTiebreakEnableMaxScore && pScore >= tiebreakMaxScore()) ||
((pScore >= settings.maxScoreTiebreakWinScore) &&
(!settings.maxScoreTiebreakEnableTwoAhead || pScore - p2Score >= 2));
}
@ -224,8 +224,8 @@ function setWon(set, player) {
// (tiebreak won / max score) || (winScoreReached && isTwoAhead) || manuallyEndedWon
return (
(settings.enableMaxScoreTiebreak ? tiebreakWon(set, player) : settings.enableMaxScore && pScore >= maxScore()) ||
(pScore >= settings.winScore && (!settings.enableTwoAhead || pScore - p2Score >= 2)) ||
(settings.enableMaxScoreTiebreak ? tiebreakWon(set, player) : settings.enableMaxScore && pScore >= maxScore()) ||
(pScore >= settings.winScore && (!settings.enableTwoAhead || pScore - p2Score >= 2)) ||
(cSet > set ? pScore > p2Score : false)
);
}
@ -353,7 +353,7 @@ function handleInput(button) {
setupDisplay();
setupInputWatchers();
}
return;
}
@ -538,4 +538,4 @@ setupDisplay();
setupInputWatchers(true);
setupMatch();
draw();
drawInitialMsg();
drawInitialMsg();