What's new in version 0.8:
- new graphics for Jack, Queen and King
What's new in version 0.7:
- removed bug with incorrect start new game after you win (thanks packbat)
- updated shuffle function to Fisher–Yates method
- added some bleeps
- added item "end game" to start menu for return to start screen
pretty nice so far!
> Solitaire is still not final. I'm planning many improvements.
in that case, you might consider moving this to the "Work in Progress" category.
Also your shuffle method is statistically biased. It's a common mistake to make because the way you have it seems intuitively correct, but it turns out it's not :)
here is the easiest way to do a statistically unbiased shuffle:
function shuffle(t) for i = #t, 1, -1 do local j = flr(rnd(i)) + 1 t[i], t[j] = t[j], t[i] end end
it's called the fisher-yates shuffling algorithm.
it's a subtle difference, but it is very important not to choose from all cards each time.
Thom: The rule for moving cards from foundations to tableaus is not in every implementation. Is not to hard to do it, but I don't know if it is neccessary. I am thinking about option for it - also for 1/3 cards draw from deck.
kittenm4ster: thank you for your idea of better shuffle algorithm, you are right. I will change it for next update. :)
Thank you all for positive feedback. There is little trick to control: if you press down in bottom row, you will jump directly to deck :)
And there is my actual todo list:
- remove bug with new game after you win (thanks packbat)
- update shuffle function to Fisher–Yates method
- add some bleeps
- add ability to restart/new game form start menu
- add autoplay function
- add options to select 1/3 cards to draw
[Please log in to post a comment]