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 443307 - double-clicking complete stacks in Spider should move them to the foundation
double-clicking complete stacks in Spider should move them to the foundation
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal enhancement
: gnome-2-22
Assigned To: GNOME Games maintainers
GNOME Games maintainers
: 515399 522747 536420 579084 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-06-02 20:10 UTC by Vincent Povirk
Modified: 2012-01-31 23:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (2.14 KB, patch)
2007-06-02 20:11 UTC, Vincent Povirk
committed Details | Review
Patch to prevent moving stacks to different suits (908 bytes, patch)
2008-02-13 02:02 UTC, Philippe Gauthier
committed Details | Review
I promise this patch won't break things like all the others (604 bytes, patch)
2008-05-18 21:56 UTC, Vincent Povirk
accepted-commit_now Details | Review

Description Vincent Povirk 2007-06-02 20:10:21 UTC
Will send patch once bug is created.
Comment 1 Vincent Povirk 2007-06-02 20:11:09 UTC
Created attachment 89250 [details] [review]
patch
Comment 2 Christian Persch 2008-01-06 19:23:30 UTC
Should double-clicking a foundation slot also move any completed stack to the foundation(s) ?
Comment 3 Vincent Povirk 2008-01-06 21:04:50 UTC
Maybe. Not a lot of games do that though.

Mostly I didn't think it was worth it because you're unlikely to have a lot of completed stacks to push at once.
Comment 4 Christian Persch 2008-01-06 22:09:38 UTC
Ok.

        * rules/klondike.scm:
        * rules/spider.scm:
        * sol.scm: Double-clicking complete stacks in Spider should move them
        to the foundation. Bug #443307, patch by Vincent Povirk.

Comment 5 Philippe Gauthier 2008-02-13 02:02:17 UTC
Created attachment 105112 [details] [review]
Patch to prevent moving stacks to different suits

The patch originally attached to this bug allows a sequence of cards of different suits to be moved to the foundation by double-clicking. This new patch (over current trunk) adds verification of the stack suit.
Comment 6 Christian Persch 2008-02-26 19:10:24 UTC
Looks ok to me; Vincent, could you have a look too?
Comment 7 Vincent Povirk 2008-02-26 21:20:03 UTC
It looks ok to me too.
Comment 8 Christian Persch 2008-03-20 23:30:10 UTC
Committed to trunk and gnome-2-22. Thanks for the patch!

        * rules/spider.scm: Don't allow moving non-uniformly suited card
        stacks to foundation. Bug #443307, patch by Philippe Gauthier.
Comment 9 Philippe Gauthier 2008-04-22 22:52:08 UTC
Looks like this patch is causing the Scheme interpreter to crash in some situations. This happens when I double-click a slot with a single card. From the following backtrace, all seems ok to me, so my scheme-foo is probably not strong enough... Shouldn't (cadr '(3 1 whatever)) return 1 ?


Variation: spider_three_decks.scm
Seed: 1009169369
Scheme error:
	(cadr Wrong type argument in position ~A: ~S (1 ()) #f)
Scheme tag:
	wrong-type-arg

Backtrace:
In unknown file:
   ?: 0* [button-double-clicked 13]
In /usr/share/gnome-games/aisleriot/games/spider.scm:
 194: 1* (and (member slot tableau) (is-playable-stack # # 1) (let # # #) ...)
 195: 2* [is-playable-stack ((3 1 #t)) ...
 195: 3*  [get-suit ((3 1 #t))]
In /usr/share/gnome-games/aisleriot/games/sol.scm:
 276: 4   [cadr ((3 1 #t))]
Comment 10 Vincent Povirk 2008-04-22 23:15:14 UTC
(get-suit (get-cards slot))..

I think get-suit applies only to a single card and get-cards returns a list of cards.

So the real question is: why did this ever work at all?
Comment 11 Vincent Povirk 2008-05-18 21:28:03 UTC
As of 2.23.1, double-clicking on a single card causes a crash, and double-clicking on a complete stack has no effect. Reopening.
Comment 12 Vincent Povirk 2008-05-18 21:56:32 UTC
Created attachment 111120 [details] [review]
I promise this patch won't break things like all the others

This should do it, and I've tested all cases where a previous attempt has done the wrong thing.
Comment 13 Christian Persch 2008-05-25 11:59:48 UTC
Thanks! Please commit to trunk and gnome-2-22 branch.
Comment 14 Christian Persch 2008-05-26 18:01:30 UTC
Committed to trunk and 2-22.

	* rules/spider.scm: Don't crash on double click. Bug #443307, patch by
	Vincent Povirk.
Comment 15 Christian Persch 2008-06-03 14:22:25 UTC
*** Bug 536420 has been marked as a duplicate of this bug. ***
Comment 16 Thomas Andersen 2008-06-27 12:53:06 UTC
Christian, did you forget to close this one?
Comment 17 Christian Persch 2008-06-27 16:36:57 UTC
Yeah, closing.
Comment 18 Vincent Povirk 2009-04-13 05:15:29 UTC
*** Bug 515399 has been marked as a duplicate of this bug. ***
Comment 19 Christian Persch 2009-04-15 20:44:41 UTC
*** Bug 579084 has been marked as a duplicate of this bug. ***
Comment 20 Vincent Povirk 2009-06-30 01:46:52 UTC
*** Bug 522747 has been marked as a duplicate of this bug. ***
Comment 21 Robert Ancell 2012-01-31 23:30:16 UTC
This bug is being reassigned to the "general" component so we can close the aisleriot bugzilla component.  Apologies for the mass email!