Skip to content

Commit

Permalink
fix score calc method
Browse files Browse the repository at this point in the history
  • Loading branch information
huoyijie committed Nov 8, 2023
1 parent 7700002 commit c748f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit c748f66

Please sign in to comment.