GNOME Bugzilla – Bug 324759
Aisleriot: Goldmine, Klondike yet another variation
Last modified: 2012-01-31 23:26:54 UTC
Scheme files to follow. (No documentation yet but could do it soon if you're interested) Gold Mine is a Klondike variation where no cards are dealt to begin with. Cards are dealt three at a time. There are no redeals. gold_mine.scm gold_mine_2.scm was easier to implement just by modifiying klondike.scm directly and gold_mine_2.scm contains a complete playable game. and then I went back and did things a litte more cleanly for gold_mine.scm but it is not entirely finished. I was a little dissappointed by how much extra information I had to include just to deal no cards, and turn off redeals. You have the option to include an imperfect new game sooner rather than later, or hold off and wait until it a better implemented version is ready. I'd like to see a "King Only" option implemented in Klondike (or even better generally available in any game which wanted it) which would make the clean implementation in gold_mine.scm more practical and add the final needed option. King only refers to being able to move cards/groups other than a King into empty spaces. Maybe I should file a seperate request for this? Adding it to klondike should be relatively easy but doing it a generalised way and having a global Options/Settings menu like Goodsol would be more complicated. I really think Goodsol has done a lot of things right which is largely where all my ideas for Aisleriot are coming from but it was probably already obvious. Hope this makes sense (if not I'll clarify later when I'm not stuck on dialup)
Created attachment 56277 [details] fully working Gold Mine game, modified Klondike
Created attachment 56278 [details] better structured but incomplete gold mine game reusing klondike.scm indirectly
Created attachment 56415 [details] documentation for goldmine Uploaded some documentation (does the job but could be better) Now we documentation and a working implementation. (And there is also the cleaner but incomplete implementation which could be incorporated later with some changes to Klondike to allow "King Only" to be disabled.)
This one isn't going to make it into 2.14. I'm a little confused about what works and what doesn't and I have run out of time to sort it all out. Sorry.
Created attachment 89860 [details] [review] add kings-only option to klondike Add a kings-only option to klondike so Gold Mine can use it. This is independent of the patch in bug 446944 (they can be applied in any order).
Created attachment 89861 [details] [review] Gold Mine game using klondike.scm Now we just need better help..
(In reply to comment #5) > Created an attachment (id=89860) [edit] > add kings-only option to klondike > > Add a kings-only option to klondike so Gold Mine can use it. > > This is independent of the patch in bug 446944 (they can be applied in any > order). > This patch looks good to me except for this: - (and (or (and (or deal-three + (and (or (and (or (= max-redeal -1) Why that change? Could you explain? Also, using -p with diff helps to make the patch more readable :)
(In reply to comment #6) > Created an attachment (id=89861) [edit] > Gold Mine game using klondike.scm > > Now we just need better help.. > Just curious... (give-status-message) (list 7 3.1) ) ^ Is that a indenting wart that has been copied form game to game or is a scheme good practice to do that kind of thing in some context?
The hint should always say to deal a card when there is a card in the stock or waste as long as a redeal remains. If there are unlimited redeals, there is always a remaining redeal. The code used to incorrectly assume that if deal-three is true there are unlimited redeals, rather than use the max-redeal variable. I probably put it in the patch because Gold Mine breaks that assumption. deal-three is true, but it allows no redeals (though it seems like I'd mention something like that.. maybe I forgot it was there?). As for the indenting, it looks like I copied that from one of the earlier Gold Mine versions.
(In reply to comment #9) > The hint should always say to deal a card when there is a card in the stock or > waste as long as a redeal remains. If there are unlimited redeals, there is > always a remaining redeal. The code used to incorrectly assume that if > deal-three is true there are unlimited redeals, rather than use the max-redeal > variable. > > I probably put it in the patch because Gold Mine breaks that assumption. > deal-three is true, but it allows no redeals (though it seems like I'd mention > something like that.. maybe I forgot it was there?). Aha, I see. Fine then. > > As for the indenting, it looks like I copied that from one of the earlier Gold > Mine versions. > Ok. Some games have bigger indentation problems anyway... :)
Committed to svn. The new game needs docs though, so I'm not closing the bug yet.
Docs committed too; closing.
This commit broke the build of aisleriot for 2.21.4. Reverting as I do not have time to figure out why... Committer, please confer here before re-committing this patch.
Note that I only reverted the documentation patch. I suspect that the problem was that gold_mine.xml was not added to Makefile.am. If you add this to the patch, I think it will build. I haven't had time to try this idea.
Sorry about that. I forgot to commit the Makefile.am change, and I also didn't make check. I fixed up the xml and re-committed; make check and make distcheck now pass. * Makefile.am: * C/aisleriot.xml: * C/gold_mine.xml: Added help for Gold Mine. Bug #324759, written by Alan Horkan.
This bug is being reassigned to the "general" component so we can close the aisleriot bugzilla component. Apologies for the mass email!