score: whitespace
parent
31073c29f1
commit
7674d601aa
|
|
@ -73,16 +73,16 @@ function setupInputWatchers(init) {
|
||||||
handleInput(1);
|
handleInput(1);
|
||||||
}
|
}
|
||||||
} else {
|
} 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)
|
// seem to support long press events)
|
||||||
if (e.type === 2 || settingsMenuOpened || process.env.BOARD === 'EMSCRIPTEN2') {
|
if (e.type === 2 || settingsMenuOpened || process.env.BOARD === 'EMSCRIPTEN2') {
|
||||||
handleInput(2);
|
handleInput(2);
|
||||||
} else {
|
} else {
|
||||||
let p = null;
|
let p = null;
|
||||||
|
|
||||||
if (matchWon(0)) p = 0;
|
if (matchWon(0)) p = 0;
|
||||||
else if (matchWon(1)) p = 1;
|
else if (matchWon(1)) p = 1;
|
||||||
|
|
||||||
// display full instructions if there is space available, or brief ones otherwise
|
// display full instructions if there is space available, or brief ones otherwise
|
||||||
if (p === null) {
|
if (p === null) {
|
||||||
drawInitialMsg();
|
drawInitialMsg();
|
||||||
|
|
@ -213,8 +213,8 @@ function tiebreakWon(set, player) {
|
||||||
let p2Score = scores[set][3+~~!player];
|
let p2Score = scores[set][3+~~!player];
|
||||||
|
|
||||||
// reachedMaxScore || (winScoreReached && isTwoAhead);
|
// reachedMaxScore || (winScoreReached && isTwoAhead);
|
||||||
return (settings.maxScoreTiebreakEnableMaxScore && pScore >= tiebreakMaxScore()) ||
|
return (settings.maxScoreTiebreakEnableMaxScore && pScore >= tiebreakMaxScore()) ||
|
||||||
((pScore >= settings.maxScoreTiebreakWinScore) &&
|
((pScore >= settings.maxScoreTiebreakWinScore) &&
|
||||||
(!settings.maxScoreTiebreakEnableTwoAhead || pScore - p2Score >= 2));
|
(!settings.maxScoreTiebreakEnableTwoAhead || pScore - p2Score >= 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -224,8 +224,8 @@ function setWon(set, player) {
|
||||||
|
|
||||||
// (tiebreak won / max score) || (winScoreReached && isTwoAhead) || manuallyEndedWon
|
// (tiebreak won / max score) || (winScoreReached && isTwoAhead) || manuallyEndedWon
|
||||||
return (
|
return (
|
||||||
(settings.enableMaxScoreTiebreak ? tiebreakWon(set, player) : settings.enableMaxScore && pScore >= maxScore()) ||
|
(settings.enableMaxScoreTiebreak ? tiebreakWon(set, player) : settings.enableMaxScore && pScore >= maxScore()) ||
|
||||||
(pScore >= settings.winScore && (!settings.enableTwoAhead || pScore - p2Score >= 2)) ||
|
(pScore >= settings.winScore && (!settings.enableTwoAhead || pScore - p2Score >= 2)) ||
|
||||||
(cSet > set ? pScore > p2Score : false)
|
(cSet > set ? pScore > p2Score : false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -353,7 +353,7 @@ function handleInput(button) {
|
||||||
|
|
||||||
setupDisplay();
|
setupDisplay();
|
||||||
setupInputWatchers();
|
setupInputWatchers();
|
||||||
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -538,4 +538,4 @@ setupDisplay();
|
||||||
setupInputWatchers(true);
|
setupInputWatchers(true);
|
||||||
setupMatch();
|
setupMatch();
|
||||||
draw();
|
draw();
|
||||||
drawInitialMsg();
|
drawInitialMsg();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue