add randomseed
Closed this issue · 1 comments
max397574 commented
if you don't use a different randomseed every time you generate random numbers they won't actually be random
you should add a math.randomseed(os.clock())
here
blackjack.nvim/lua/blackjack/match.lua
Line 96 in 0968a19
you can test this out by doing a few :lua =math.random(52)
and then restarting neovim and doing it again
the numbers will be the same
alanfortlink commented
That should address the issue. I'm setting the seed for every new card deck. Thanks for the tip!