Log In  


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

Cart #solitaire_by_myshaak-5 | 2019-11-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
23

23


There have been other Solitaire games for Pico-8. Good, could use a few bleeps and blurps for the cards. Other than that, nicely done.

Star for you.


Took me a minute to figure the controls, but that's quite a competent implementation! Thanks for this. :)


Thanks for positive feedback, I am planning to add some more functions. Sound effects, some card animations and autoplay, stay tuned :-)


It took me a few seconds to figure out the controls, they don't always do what I expect, but I was enjoy it it until this happened :

I was trying to pick up a card. I may have pressed the wrong button. Not sure.


Hi, I think, that I found the problem and resolve it in actual version. Sorry for that, Solitaire is still not final. I'm planning many improvements.


1

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.


Also, something important you may want to include is the ability to take cards down from the ace stack to move other cards that are otherwise impossible to move.(If possible, please include this.)


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. :)


Had a bug, too - won a game, went back to the title screen, and instead of starting the second game I got this:

Still really enjoying this - I like how the selected cards move around with the cursor now.


Solitaire (or similar) was on my TO DO list as well, @Myshaak.

However I applaud you for getting it to work as well as it does. The code involved in shifting cards correctly could be a real programmer's nightmare. Nicely done !


1

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

next:

  • add autoplay function
  • add options to select 1/3 cards to draw

Auto function ? That would actually be awesome. Sit back, relax, and watch the computer show you how it's done before you tackle it yourself.

The coding involved ? Astronomical. Your perseverance - equally so. :)


dw817 :) Autoplay in solitaire is function, which automatically move cards from tableaus or stock to foundations, if it is obvious :)


Another quick bug report: if you click [x] on the discard when there's no cards in the discard, it throws an error message.

Thanks again for the game!



[Please log in to post a comment]