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 315525 - New game: Spider three decks
New game: Spider three decks
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: general
2.10.x
Other Linux
: Normal enhancement
: gnome-2-20
Assigned To: Rosanna Yuen
GNOME Games maintainers
Depends on: 393709
Blocks:
 
 
Reported: 2005-09-08 11:21 UTC by Daniel Werner
Modified: 2012-01-31 23:25 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Spider three decks (scm) (9.04 KB, text/plain)
2005-09-08 11:22 UTC, Daniel Werner
  Details
Spider three decks (help file) (2.42 KB, text/plain)
2005-09-08 11:23 UTC, Daniel Werner
  Details
patch for spider.scm to add an "allow-empty-slots" option (1.12 KB, patch)
2006-04-29 16:51 UTC, Vincent Povirk
none Details | Review
spider_three_decks.scm, using spider.scm (2.91 KB, text/x-scheme)
2006-04-29 18:05 UTC, Vincent Povirk
  Details
patch to add Spider Three Decks (10.65 KB, patch)
2007-02-18 03:37 UTC, Vincent Povirk
committed Details | Review

Description Daniel Werner 2005-09-08 11:21:34 UTC
Version details: 2.10.1
Distribution/Version: Debian Unstable

This is a new variant of spider. As I have only a gnome 2.10 system here, it's
written for that version. I don't know scheme either, so maybe somebody should
have a look at the code first. Everything works fine, only one bug I could not
resolve: After dealing new cards the status bar is not updated.
Comment 1 Daniel Werner 2005-09-08 11:22:39 UTC
Created attachment 51955 [details]
Spider three decks (scm)

Source code of the new game variant.
Comment 2 Daniel Werner 2005-09-08 11:23:52 UTC
Created attachment 51956 [details]
Spider three decks (help file)

Help file for the new game variant.
Comment 3 Callum McKenzie 2005-09-08 23:19:48 UTC
I should be able just port the 2.12 changes from the two and four-suit versions
of spider. 

I'll have a look at it later - since we've just released 2.12 a lot more bug
reports are flowing in and things are busy.

Comment 4 Alan Horkan 2006-04-24 17:26:41 UTC
You might want to consider rewriting this so that it loads spider.scm instead of copying all the same code from there.   

You would need to make more changes but see spider one suit as a very basic example:
http://cvs.gnome.org/viewcvs/gnome-games/aisleriot/rules/spider_one_suit.scm?rev=1.4&view=markup

I have a few personal preferences and bits of style I've picked up from other games when writing these new games you might consider using too (or I'll try and remember to patch myself when the game is committed).  Rather than dealing the whole tableau in one line I break it up into seperate lines to improve the readability and maintainability of the code.  Sometimes the spacing and indentation can show you at a glance what the deck will look like when it is done.  
Rather than repeating flip-card many times you can oftne use a single (map flip-top-card tableau)

[must go for dinner.  if you aren't interested in trying any of my suggestions that is fine and I'll try and do them myself later but I thought I'd suggest them just in case you wanted to try getting your code to work with Gnome games 2.14]
Comment 5 Vincent Povirk 2006-04-24 20:37:32 UTC
Loading spider.scm is definitely the way to go. This looks close enough to spider that most of the code can be maintained there.

I would actually use spiderette.scm as an example, since the layout is different:
http://cvs.gnome.org/viewcvs/gnome-games/aisleriot/rules/spiderette.scm?rev=1.10&view=markup

And it'd probably help to add some sort of setting (not necessarily for the user) in spider.scm for allowing empty piles when redealing, rather than trying to hack it into this game by replacing functions.
Comment 6 Daniel Werner 2006-04-29 11:29:23 UTC
(In reply to comment #4)
> [must go for dinner.  if you aren't interested in trying any of my suggestions
> that is fine and I'll try and do them myself later but I thought I'd suggest
> them just in case you wanted to try getting your code to work with Gnome games
> 2.14]

Alan,

It would be great if you could try to implement this game in gnome games 2.14. Since I don't know anything about scheme I'm unable to improve my originally submitted version. 

By the way, there is another spider variant with four complete decks. Initially there are 14 piles, 6 with 5 cards each, 8 with 4 cards (including the flipped top card) and the stock with the remaining 146 cards. 

Comment 7 Vincent Povirk 2006-04-29 16:51:25 UTC
Created attachment 64529 [details] [review]
patch for spider.scm to add an "allow-empty-slots" option

This patch creates a variable "allow-empty-slots" in Spider that's always false so that other games using spider.scm can change the rules to allow a deal when slots in the tableau are empty.
Comment 8 Vincent Povirk 2006-04-29 18:05:52 UTC
Created attachment 64533 [details]
spider_three_decks.scm, using spider.scm
Comment 9 Andreas Røsdal 2007-01-10 21:42:33 UTC
Now that the spider shuffle variations (1, 2, 4) have been integrated ,see Bug #393709, adding this fourth variation should be pretty easy, I would imagine.
Anyone interested in updating the patch for Spider three decks? 
Comment 10 Vincent Povirk 2007-01-16 16:04:56 UTC
The patch in comment 7 (needed because Spider Three Decks allows empty slots when dealing), the scm file in comment 8, and the help file from comment 2 should still be sufficient.
Comment 11 Andreas Røsdal 2007-01-16 17:57:57 UTC
Very well, then Vincent, could you integrate all this in a patch?   

Could this be integrated into the new spider.scm? It has a menu option for selecting spider variant. Also, if this introduces a new translatable string, it will have to wait until aften gnome-games 2.18.0, unless someone else wants to announce the string change.
Comment 12 Vincent Povirk 2007-01-17 00:13:46 UTC
Given that this has a new layout and a rules change (empty slots being allowed), I don't think it would make sense to add it to spider.scm, either for making a clean implementation or for the user. And I think it probably will involve a new string.

I'll get back to you with a patch because there were unanticipated problems (I have until 2.19 so it should be ok).
Comment 13 Vincent Povirk 2007-02-18 03:37:20 UTC
Created attachment 82776 [details] [review]
patch to add Spider Three Decks

I guess I'll stop sitting on this patch now, even though it can't be committed until the next unstable gnome-games branch. I'm mostly pretty happy with this.

I wonder if the hinting code should be altered for this game to suggest moving a card on an empty slot only after all other options (including dealing more cards) are exhausted. As it is it works fine though.

I also wonder if the "Strategy" section of the help should say something new.
Comment 14 Andreas Røsdal 2007-05-06 11:22:39 UTC
Vincent, do you want to do any changes to this patch before I commit it?
Comment 15 Vincent Povirk 2007-05-06 14:55:55 UTC
No. I don't think changing the hinting code is a good idea because the situation where you have to leave slots blank is rare anyway, and I have no idea what else can be used for the <strategy> section in the help.
Comment 16 Christian Persch 2007-06-02 11:48:45 UTC
This patch was contained in the new-aisleriot git branch which now has been merged to svn. Do we need to do anything else here, or can this bug be closed?
Comment 17 liam 2007-06-10 06:43:34 UTC
I'm not sure if this is related, but adding spider with three decks has broken the base spider:
there's no longer a spider and a spider (one suit), but instead, there's only Spider, which in fact plays the one suit variant of the game.

Rather than open a new bug I've just added this comment, as I suspect the refactoring of spider.scm.
Comment 18 Christian Persch 2007-06-10 13:23:39 UTC
The spider variants were unified in bug 393709, not this one. You should be able to use the "Spider" toplevel menu to choose the variant; does that not work ? (It works for me.)
Comment 19 liam 2007-06-10 17:23:59 UTC
Yes, it didn't occur to me that "select game" wouldn't select the game, but only a set of variations, and choose the pointless version as a default.

Several other people I asked (to try and see where the bug was coming from) had the same reaction.

I suggest make the 4 suit one the default, then, and bring the other Spider games into the same menu, or allow the main Select Game to have hierarchical choices, so people discover it.
Comment 20 Christian Persch 2007-06-15 11:04:52 UTC
4-suit is the default. But I think I see where your problem comes from, bug 403961.
Comment 21 Christian Persch 2007-07-01 12:31:10 UTC
Let's close this bug which is about _adding_ 3-deck spider; if there are any problems with 3-deck spider, please open a new, specific bug.
Comment 22 Robert Ancell 2012-01-31 23:25:27 UTC
This bug is being reassigned to the "general" component so we can close the aisleriot bugzilla component.  Apologies for the mass email!