From ee639d459e7953ab5cf1f1eb9ff82394535dd7c3 Mon Sep 17 00:00:00 2001 From: adrien Date: Fri, 21 Apr 2023 19:40:21 +0200 Subject: [PATCH] fix B2B --- app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index ffcd7ac..8f97909 100644 --- a/app.js +++ b/app.js @@ -486,13 +486,14 @@ class Stats { } // Back to back sequence - if ((clearedLines == 4) || (tSpin && clearedLines)) { + if ((nbClearedLines == 4) || (tSpin && nbClearedLines)) { + this.b2b++ if (this.b2b >= 1) { let b2bScore = patternScore / 2 messagesSpan.innerHTML += `
BACK TO BACK x${this.b2b}
${b2bScore}
\n` this.score += b2bScore } - } else { + } else if ((0 < nbClearedLines) && (nbClearedLines < 4) && !tSpin) { this.b2b = -1 }