fix: shuffle not really random

closes #303
This commit is contained in:
tomasklaen
2022-10-07 16:41:18 +02:00
parent 51abce27a0
commit 9935d6b72a

View File

@@ -804,6 +804,7 @@ function decide_navigation_in_list(list, current_index, delta)
if state.shuffle then
local new_index = current_index
math.randomseed(os.time())
while current_index == new_index do new_index = math.random(#list) end
return new_index, list[new_index]
end