From c748f66f0e29d4044fe35bcc197eb13277b2b81b Mon Sep 17 00:00:00 2001 From: huoyijie Date: Wed, 8 Nov 2023 11:22:18 +0800 Subject: [PATCH] fix score calc method --- src/pages/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/index.js b/src/pages/index.js index d2b6343..3762f38 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -66,7 +66,7 @@ export default function Home() { const onCollise = (elimiLines) => { if (elimiLines > 0) { setEliminatedLines(eliminatedLines + elimiLines) - setScore(score + 10 * Math.pow(2, elimiLines)) + setScore(score + 10 * (elimiLines == 1 ? 1 : Math.pow(2, elimiLines))) } queueMicrotask(next) }