diff options
Diffstat (limited to 'apps/plugins/boomshine.lua')
-rw-r--r-- | apps/plugins/boomshine.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/plugins/boomshine.lua b/apps/plugins/boomshine.lua index 79b28c6776..1729cbbf8c 100644 --- a/apps/plugins/boomshine.lua +++ b/apps/plugins/boomshine.lua | |||
@@ -212,7 +212,7 @@ function random_color() | |||
212 | end | 212 | end |
213 | 213 | ||
214 | function start_round(level, goal, nrBalls, total) | 214 | function start_round(level, goal, nrBalls, total) |
215 | local player_added, score, exit, nrExpandedBalls = false, 0, false, 0 | 215 | local player_added, score, exit, nrExpendedBalls = false, 0, false, 0 |
216 | local balls, explodedBalls = {}, {} | 216 | local balls, explodedBalls = {}, {} |
217 | local cursor = Cursor:new() | 217 | local cursor = Cursor:new() |
218 | 218 | ||
@@ -257,7 +257,7 @@ function start_round(level, goal, nrBalls, total) | |||
257 | for _, explodedBall in ipairs(explodedBalls) do | 257 | for _, explodedBall in ipairs(explodedBalls) do |
258 | if ball:checkHit(explodedBall) then | 258 | if ball:checkHit(explodedBall) then |
259 | score = score + 100*level | 259 | score = score + 100*level |
260 | nrExpandedBalls = nrExpandedBalls + 1 | 260 | nrExpendedBalls = nrExpendedBalls + 1 |
261 | table.insert(explodedBalls, ball) | 261 | table.insert(explodedBalls, ball) |
262 | table.remove(balls, i) | 262 | table.remove(balls, i) |
263 | break | 263 | break |
@@ -280,7 +280,7 @@ function start_round(level, goal, nrBalls, total) | |||
280 | rb.lcd_clear_display() | 280 | rb.lcd_clear_display() |
281 | 281 | ||
282 | set_foreground(DEFAULT_FOREGROUND_COLOR) | 282 | set_foreground(DEFAULT_FOREGROUND_COLOR) |
283 | draw_positioned_string(0, 0, string.format("%d balls expanded", nrExpandedBalls)) | 283 | draw_positioned_string(0, 0, string.format("%d balls expended", nrExpendedBalls)) |
284 | draw_positioned_string(0, 1, string.format("Level %d", level)) | 284 | draw_positioned_string(0, 1, string.format("Level %d", level)) |
285 | draw_positioned_string(1, 1, string.format("%d level points", score)) | 285 | draw_positioned_string(1, 1, string.format("%d level points", score)) |
286 | draw_positioned_string(1, 0, string.format("%d total points", total+score)) | 286 | draw_positioned_string(1, 0, string.format("%d total points", total+score)) |
@@ -309,7 +309,7 @@ function start_round(level, goal, nrBalls, total) | |||
309 | end | 309 | end |
310 | end | 310 | end |
311 | 311 | ||
312 | return exit, score, nrExpandedBalls | 312 | return exit, score, nrExpendedBalls |
313 | end | 313 | end |
314 | 314 | ||
315 | -- Helper function to display a message | 315 | -- Helper function to display a message |
@@ -361,11 +361,11 @@ while levels[idx] ~= nil do | |||
361 | 361 | ||
362 | display_message(rb.HZ*2, "Level %d: get %d out of %d balls", idx, goal, nrBalls) | 362 | display_message(rb.HZ*2, "Level %d: get %d out of %d balls", idx, goal, nrBalls) |
363 | 363 | ||
364 | local exit, score, nrExpandedBalls = start_round(idx, goal, nrBalls, highscore) | 364 | local exit, score, nrExpendedBalls = start_round(idx, goal, nrBalls, highscore) |
365 | if exit then | 365 | if exit then |
366 | break -- Exiting.. | 366 | break -- Exiting.. |
367 | else | 367 | else |
368 | if nrExpandedBalls >= goal then | 368 | if nrExpendedBalls >= goal then |
369 | display_message(rb.HZ*2, "You won!") | 369 | display_message(rb.HZ*2, "You won!") |
370 | idx = idx + 1 | 370 | idx = idx + 1 |
371 | highscore = highscore + score | 371 | highscore = highscore + score |