by palsecam · 2y ago · 0 comments
> In the end I didn't need to do too much space optimization to keep Solitaire down to two dotstrips
So, a full implementation of Solitaire in ~4KiB. Count me impressed!
I like to show off that my own (as a web app: https://FreeSolitaire.win) is "only" 21KiB, but that’s small fry in comparaison!
> 118 on your own + 0 hinted + 0 to auto-end.
> The computer could do it in 117 moves.
I've played a lot of solitaire over the past four decades, one of my favourite versions was on the HP 620LX. I'd like to think I'm just this amazing, but it feels like it was too easy.
What kind of shuffling does your program use? Do you start off with easier decks to entice new users to keep playing or was it just pure chance that I got such an easy shuffle?
In any regard, I like your implementation. Worked extremely well in Safari on iOS, that's an accomplishment on its own, it's rare that web based games work as well as yours did on mobile.
The shuffling is random, but only winnable decks are generated (by default). The computer algorithm/solver is described here: https://FreeSolitaire.win/strategy
So it’s pure chance you got an easy shuffle.
> In any regard, I like your implementation.
Thanks, I’m glad you like it! If you have suggestions for improvement, I’m all ears (here or by e-mail) ;-)
Still fun, though!
I won Solitaire game #456491 in 3 min 39 s, 126 moves. Beat me if you can: https://FreeSolitaire.win/turn-one#456491
> The computer could do it in 129 moves.
seams i beat the computer
Unbelievable. But I agree, it's very well done!
Or, rather, big fry.