call random every frame so retroarch TIC-80 doesnt start at the same game every time
parent
6f96d801e0
commit
4555a95357
|
@ -70,7 +70,8 @@ end
|
||||||
|
|
||||||
function shuffle(cards)
|
function shuffle(cards)
|
||||||
for a,c in ipairs(cards) do
|
for a,c in ipairs(cards) do
|
||||||
local b=math.random(#cards)
|
if a == #cards then break end
|
||||||
|
local b=a + math.random(#cards - a)
|
||||||
local tmp=cards[a]
|
local tmp=cards[a]
|
||||||
cards[a]=cards[b]
|
cards[a]=cards[b]
|
||||||
cards[b]=tmp
|
cards[b]=tmp
|
||||||
|
@ -122,6 +123,7 @@ function BOOT()
|
||||||
end
|
end
|
||||||
|
|
||||||
function TIC()
|
function TIC()
|
||||||
|
math.random(52)
|
||||||
if btnp(6) then reset() end
|
if btnp(6) then reset() end
|
||||||
if game_state=='MENU' then
|
if game_state=='MENU' then
|
||||||
update_menu();
|
update_menu();
|
||||||
|
|
Loading…
Reference in New Issue