After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 320722 - Add "3-deck Klondike"
Add "3-deck Klondike"
Status: RESOLVED WONTFIX
Product: aisleriot
Classification: Other
Component: games
git master
Other Linux
: Normal enhancement
: ---
Assigned To: aisleriot-maint
aisleriot-maint
Depends on:
Blocks:
 
 
Reported: 2005-11-04 22:33 UTC by Zach Keene
Modified: 2011-12-08 22:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to klondike.scm and klondike.xml (5.73 KB, patch)
2005-11-04 22:34 UTC, Zach Keene
none Details | Review
Gargantua scm file (2.27 KB, text/plain)
2005-11-04 22:35 UTC, Zach Keene
  Details
Gargantua xml file (3.06 KB, text/plain)
2005-11-04 22:35 UTC, Zach Keene
  Details
Klondike scm/xml patch with mutually exclusive options (5.75 KB, patch)
2005-12-09 05:55 UTC, Zach Keene
committed Details | Review
klondike_three_decks.scm (2.37 KB, text/plain)
2006-03-10 05:29 UTC, Vincent Povirk
  Details

Description Zach Keene 2005-11-04 22:33:30 UTC
Gargantua is a two-deck version of Klondike, so some of the Klondike tweaks are
just changes to allow Gargantua to open with (load "klondike.scm").

While I was mucking about I separated the "Three card deal" and "Unlimited
redeal" options. (One card deal with unlimited redeals is the variation I'm most
familiar with.) I also added a "No Redeal" option (one card deal with no redeal
is how the game is described in Morehead and Mott-Smith's "The Complete Book of
Solitare and Patience Games").

One slight hiccup is that I could find no way for checking one redeal option to
uncheck the other. I could set the internal variables correctly but the change
wouldn't be reflected on the menu. So for the moment it's possible to check both
redeal options, but Unlimited overrides No in this case.
Comment 1 Zach Keene 2005-11-04 22:34:24 UTC
Created attachment 54325 [details] [review]
Patch to klondike.scm and klondike.xml
Comment 2 Zach Keene 2005-11-04 22:35:00 UTC
Created attachment 54326 [details]
Gargantua scm file
Comment 3 Zach Keene 2005-11-04 22:35:30 UTC
Created attachment 54327 [details]
Gargantua xml file
Comment 4 Vincent Povirk 2005-11-11 03:24:35 UTC
You missed a spot. ;)
       (and (or (and (or deal-three
-			(< FLIP-COUNTER 2))
+			(< FLIP-COUNTER max-redeal))
 		    (not (empty-slot? waste)))
 	       (not (empty-slot? stock))) 
 	   (list 0 (_"Deal a new card from the deck")))

Now that deal-three has nothing to do with this, that section of code doesn't
seem to make sense. I think you just missed replacing it with the appropriate
redeal option in that situation.

And this gives me an excuse to say that I am happy to see the redeal and 3-card
deal options separated, though I wonder at the necessity for yet another redeal
option (is there another name we could use for that variation?).
Comment 5 Vincent Povirk 2005-11-11 03:34:09 UTC
Gargantua appears to be very similar to Jumbo. I didn't actually read the rules
so I can't say how similar (and I'm having some other problems with it I need to
investigate further), but you should probably check to see if you've duplicated
a game.
Comment 6 Vincent Povirk 2005-11-11 04:27:01 UTC
The other problems I was having (double-clicking any card but an ace causes a
crash) seem to be because by sol.scm is out of date and doesn't have (add-to-value).
Comment 7 Zach Keene 2005-11-11 05:52:38 UTC
Yeah, looks like I duplicated a game again. Argh.

<i>Now that deal-three has nothing to do with this, that section of code doesn't
seem to make sense. I think you just missed replacing it with the appropriate
redeal option in that situation.</i>

Yep, that's what happened. It only causes problems when the stock is empty so I
never noticed anything amiss. Quick fix:

-       (and (or (and (or deal-three
+       (and (or (and (or unlimited-redeal
Comment 8 Callum McKenzie 2005-12-04 07:48:47 UTC
Since I have now ignored this bug for pretty much exactly a month, I'd better
comment on it (sorry guys).

I'm OK with putting an extra deal method in the options, but if we have to have
funny things like one option over-rides another then it means it is time for me
to implement radio button in the option code.

Zach: if you have time could you post a modified version of the klondike patch
that you think is correct with all the various modifications. I can do it myself
- but it will probably take longer.

Anyway, I should be properly back-on-deck and a bit more responsive to bugs than
I have been for the past month and a bit.
Comment 9 Alan Horkan 2005-12-07 20:42:31 UTC
> Yeah, looks like I duplicated a game again. Argh.  

Adding a link from the Klondike documentation to other Klondike variations
including Jumbo might help prevent this sort of thing (at least that is where
I'd start).  I've been trying to get a clear idea of what games exist already
but there is no easy way to do it I can think of.  
Comment 10 Zach Keene 2005-12-09 05:55:30 UTC
Created attachment 55798 [details] [review]
Klondike scm/xml patch with mutually exclusive options

Well, this is what I had tried initially. Fiddling around with the redeal
options for a while will confuse things currently though (you can get two
redeals with Unlimited still checked for example.)
Comment 11 Callum McKenzie 2006-01-16 05:34:34 UTC
I'm afraid to say I won't be committing this in time for 2.14. I want to implement the mutually exclusive buttons with proper radio-button behaviour and I haven't figured out what the best way to implement it on the scheme end is. Ideally it would just be flagged in get-options and the rest of the scheme code wouldn't have to worry about ensuring it was mutually exclusive or anything like that. Finding a clean scheme syntax that is easy to parse on the C side is the problem.
Comment 12 Vincent Povirk 2006-03-10 05:29:48 UTC
Created attachment 61019 [details]
klondike_three_decks.scm

I'm hoping this patch gets in 2.15, even if the new options aren't exposed to the user. This is because it allowed me to clone Klondike Three Decks in a matter of minutes. And it'll probably help with what Alan's trying to do in bug 324759.

Having said all of that, perhaps Klondike Three Decks should be kept out of aisleriot forever. The game is too slow for anyone's good.
Comment 13 Callum McKenzie 2006-05-12 10:50:37 UTC
The support for radio-buttons (i.e. mutually exclusive options) will hit CVS soon.
(It's written and works, but I wrote some other code at the airport that isn't working quite right yet) Hopefully I can get the rest of the stuff in this bug integrated in a day or two.
Comment 14 Callum McKenzie 2006-05-18 08:48:33 UTC
I've applied the "mutually exclusive" options patch with some major changes.

The biggest one was dropping the "unlimited redeals" mode. It isn't significantly easier than the standard 2 redeals mode (90% of the time you have either won or lost by the end of two redeals) and so I dropped it in the name of simplicity.

The "Klondike" menu now contains three radio buttons: three card deals, one card deals and no redeals. There are still some subtle bugs, like the redeals counter not updating when you change modes, but nothing too important.

I also made some changes to the code. The apply-options function was made simpler because the menu code handles the mutually exclusive options. The search-foundation was changed from an explicitly recursive function to an or-map (the motivation for this was mostly "because I could" - I've currently got a thing about the map/reduce style of code). 

I still haven't seriously looked at the the three-deck klondike yet (but I have downloaded the file).
Comment 15 Christian Persch 2008-01-06 22:29:19 UTC
Retitling for the remaining issue.
Comment 16 Christian Persch 2008-03-25 12:01:23 UTC
Re-assigning to default owner.
Comment 17 Vincent Povirk 2009-02-28 21:22:46 UTC
Klondike Three Decks can't be added until someone writes a help file.
Comment 18 Christian Persch 2011-12-08 22:23:23 UTC
(In reply to comment #12)
> Having said all of that, perhaps Klondike Three Decks should be kept out of
> aisleriot forever. The game is too slow for anyone's good.

I have to agree; it's boring. -> I'm going to veto this. Sorry :-)

(BTW the code ist buggy; I'd have won my first game, but the game already said 'won' when there were still cards on the tableau and more cards to deal. Usually we either auto-play all the cards to the foundations, or wait for the user to do so.)