Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiplier - No issue #26

Closed
mrtnRitter opened this issue Jul 23, 2017 · 2 comments
Closed

Multiplier - No issue #26

mrtnRitter opened this issue Jul 23, 2017 · 2 comments

Comments

@mrtnRitter
Copy link

Hi Lonami!

I love our game - it's the only game on my phone and I'm pretty addicted.

But... what about multipliers? The more lines you clear, the higher the score you get? Like in Tetris, where clearing four lines have a higher value then clearing four times one line.

Or is such a thing already implemeted and I just missed it?

@Lonami
Copy link
Member

Lonami commented Jul 23, 2017

Such thing is already implemented and you just missed it :)

I'm glad you enjoy the game, thanks for the feedback!

@Lonami Lonami closed this as completed Jul 23, 2017
@Lonami
Copy link
Member

Lonami commented Jul 23, 2017

You can calculate the same with this JavaScript code (Ctrl+Shift+I on Chrome or Chromium):

function calculateClearScore(stripsCleared, boardSize) {
    if (stripsCleared < 1) return 0;
    if (stripsCleared == 1) return boardSize;
    return boardSize * stripsCleared + calculateClearScore(stripsCleared - 1, boardSize);
}

for (var i = 0; i <= 6; ++i) {
    console.log("Clearing "+i+" strips gives "+calculateClearScore(i, 10));
}

With this result:

Clearing 1 strips gives 10
Clearing 2 strips gives 30
Clearing 3 strips gives 60
Clearing 4 strips gives 100
Clearing 5 strips gives 150
Clearing 6 strips gives 210

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants