# French 2-deck Solitaire

**URL:** <https://discourse.processing.org/t/french-2-deck-solitaire/32753>\
**Category:** Gallery\
**Created:** [October 11, 2021, 5:04pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753 "2021-10-11T17:04:04Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![JoseMY](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josemy/32/2016_2.png) [@JoseMY](https://discourse.processing.org/u/JoseMY)\
**Post date:** [October 11, 2021, 5:04pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/1 "2021-10-11T17:04:04Z")

</div>

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:  
https://openprocessing.org/sketch/1304073/embed/?

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

---

<div class="post-metadata">

**Author:** ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)\
**Post date:** [October 12, 2021, 6:40pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/2 "2021-10-12T18:40:29Z")

</div>

🤣

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/2/2f79261661251b2117b265acdcf2076a27e1efd9.jpeg)

great job!!

---

<div class="post-metadata">

**Author:** ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)\
**Post date:** [October 13, 2021, 1:24pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/3 "2021-10-13T13:24:18Z")

</div>

Very neat well done 👍

---

<div class="post-metadata">

**Author:** ![JoseMY](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josemy/32/2016_2.png) [@JoseMY](https://discourse.processing.org/u/JoseMY)\
**Post date:** [October 13, 2021, 3:16pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/4 "2021-10-13T15:16:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)\
**Post date:** [October 13, 2021, 7:16pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/5 "2021-10-13T19:16:20Z")

</div>

this is very satisfying

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/5/5cd3f240e1e01a4394b7f070eb2333fbd608fb6d.jpeg)

---

<div class="post-metadata">

**Author:** ![JoseMY](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josemy/32/2016_2.png) [@JoseMY](https://discourse.processing.org/u/JoseMY)\
**Post date:** [October 13, 2021, 7:33pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/6 "2021-10-13T19:33:49Z")

</div>

@micuat 🍾 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.

---

<div class="post-metadata">

**Author:** ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)\
**Post date:** [October 14, 2021, 6:44pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/7 "2021-10-14T18:44:43Z")

</div>

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/b18f8eb2087c0e280195d2330c5ac1617088074f.png)

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 🤪

---

<div class="post-metadata">

**Author:** ![JoseMY](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josemy/32/2016_2.png) [@JoseMY](https://discourse.processing.org/u/JoseMY)\
**Post date:** [October 14, 2021, 7:35pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/8 "2021-10-14T19:35:31Z")

</div>

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! 🏅🏆🃏

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

---

<div class="post-metadata">

**Author:** ![JoseMY](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josemy/32/2016_2.png) [@JoseMY](https://discourse.processing.org/u/JoseMY)\
**Post date:** [October 17, 2021, 1:45pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/9 "2021-10-17T13:45:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [November 5, 2021, 12:49am UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/10 "2021-11-05T00:49:48Z")

</div>

Really great work.

> [@JoseMY](#):
>
> I’ve added a fullscreen mode and a winning detection routine.

Is there a new sketch, or is it the same one posted above? In the sketch above, there is a fullscreen button, finishing the game does not appear to trigger the winning detection routine – at least, nothing happens when the decks are loaded, and the cards remain draggable.

---

<div class="post-metadata">

**Author:** ![JoseMY](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josemy/32/2016_2.png) [@JoseMY](https://discourse.processing.org/u/JoseMY)\
**Post date:** [November 5, 2021, 4:53pm UTC](https://discourse.processing.org/t/french-2-deck-solitaire/32753/11 "2021-11-05T16:53:11Z")

</div>

Hummm… Winning routine is triggered only if all cards are on the decks, but maybe it is broken somewhere.  
Fullscreen does not work --at least not how I wanted it. Playing in my smartphone with fullscreen renders cards at same size as when playing in the small browser with headings.
