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
12

P#69990 2019-11-17 21:53 ( Edited 2019-11-26 17:31)

:: dw817

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.

P#69997 2019-11-18 01:48

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

P#70004 2019-11-18 04:03

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

P#70011 2019-11-18 07:09

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.

P#70030 2019-11-18 23:35

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.

P#70042 2019-11-19 18:56
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.

P#70049 2019-11-20 01:06
:: Thom

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

P#70075 2019-11-20 17:17

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

P#70078 2019-11-20 18:52 ( Edited 2019-11-20 18:53)

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.

P#70141 2019-11-23 03:13
:: dw817

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 !

P#70155 2019-11-23 04:39 ( Edited 2019-11-23 04:39)
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
P#70160 2019-11-23 12:04 ( Edited 2019-11-23 12:27)
:: dw817

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

P#70165 2019-11-23 15:58

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

P#70167 2019-11-23 17:08

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!

P#73144 2020-02-16 01:25

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-10-27 00:39 | 0.041s | 4194k | Q:60