diff options
author | Christ van Willegen <cvwillegen@gmail.com> | 2015-04-08 09:45:02 +0200 |
---|---|---|
committer | Christ van Willegen <cvwillegen@gmail.com> | 2015-04-08 09:45:02 +0200 |
commit | 926829cba33671a37f1eceade54be410ac6927e3 (patch) | |
tree | 668991d1671ccdaf10c24f70d57e1c088412facc | |
parent | e4b8eaa9d2e32ad7b89c848e3a9aa880772bd962 (diff) | |
download | rockbox-926829cba33671a37f1eceade54be410ac6927e3.tar.gz rockbox-926829cba33671a37f1eceade54be410ac6927e3.zip |
Re-seed the random generator for each new game.
Change-Id: I1b814e8475798830d204b4838d98b8b671d93e02
-rw-r--r-- | apps/plugins/boomshine.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugins/boomshine.lua b/apps/plugins/boomshine.lua index 2eb43dedbd..79b28c6776 100644 --- a/apps/plugins/boomshine.lua +++ b/apps/plugins/boomshine.lua | |||
@@ -353,6 +353,8 @@ if HAS_TOUCHSCREEN then | |||
353 | end | 353 | end |
354 | rb.backlight_force_on() | 354 | rb.backlight_force_on() |
355 | 355 | ||
356 | math.randomseed(os.time()) | ||
357 | |||
356 | local idx, highscore = 1, 0 | 358 | local idx, highscore = 1, 0 |
357 | while levels[idx] ~= nil do | 359 | while levels[idx] ~= nil do |
358 | local goal, nrBalls = levels[idx][1], levels[idx][2] | 360 | local goal, nrBalls = levels[idx][1], levels[idx][2] |