French 2-deck Solitaire

Hello everybody!

After many years thinking about programming this on other libraries, I finally programmed a French solitaire using P5js.

It is slightly different from Klondike, since it uses two decks, you can place ANY card (not only kings) on empty foundations and dealing rules are not the same.

(If someone gives me the name of this kind of solitaire, I would be grateful to know).

Works is still on progress: it can’t detect a victory or a defeat, and you can’t undo your moves. But it is playable and enjoyable.

You can see it at:

It took me 24 hours split over three days.
Yours,
José G Moya Y.

7 Likes

:rofl:

great job!!

1 Like

Very neat well done :+1:

1 Like

Thank you for your comments!

Please notice there was a bug with dealing. I fixed it 12 hours after my post. But, another 12 hours later, I discovered that my fix had not been properly saved and a syntax error was thrown.

I hope it works now.

I’m thinking about:
A) Adding an undo option [unlimited? 3 moves in advance? Until you reveal or deal?]

B) Adding a fullscreen button (adding the button itself is easy. The tough part is I have to reload the cards from the SVG).

this is very satisfying

@micuat :champagne: You won, congrats!

I still have to do a winning routine. Classic windows solitaire style (cards bumping over the floor) would be easy…

Atentamente,
José G. Moya Y.

P.D. Escribo desde un móvil. Disculpe posibles erratas.

Thanks, it was very fun =)
But now, seeing @micuat’s answer, I’m not sure if you are suppose to end like he did or like I did :crazy_face:

1 Like

Well, there is no “winning check” (it is easy to implement, but it would require a tutorial and a “losing check”).

From your ending position it is easy to move every ace to foundations, then every two, three… and so on. So you have won. Congrats! :medal_sports::trophy::black_joker:

(I won my two first games, then I lose every game).

Atentamente,
José G. Moya Y.

P.D. Escribo desde un móvil. Disculpe posibles erratas.

Hi everyone again!

I’ve added a fullscreen mode and a winning detection routine.
I also changed a rule, following the suggestion of my sister, an expert on this kind of solitaire:
When you deal and have an empty pile, you deal just one card on the pile.
But when you deal and have face down cards, you shouldn’t deal.