GNOME Bugzilla – Bug 443307
double-clicking complete stacks in Spider should move them to the foundation
Last modified: 2012-01-31 23:30:16 UTC
Will send patch once bug is created.
Created attachment 89250 [details] [review] patch
Should double-clicking a foundation slot also move any completed stack to the foundation(s) ?
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.
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.
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.
Looks ok to me; Vincent, could you have a look too?
It looks ok to me too.
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.
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))]
(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?
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.
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.
Thanks! Please commit to trunk and gnome-2-22 branch.
Committed to trunk and 2-22. * rules/spider.scm: Don't crash on double click. Bug #443307, patch by Vincent Povirk.
*** Bug 536420 has been marked as a duplicate of this bug. ***
Christian, did you forget to close this one?
Yeah, closing.
*** Bug 515399 has been marked as a duplicate of this bug. ***
*** Bug 579084 has been marked as a duplicate of this bug. ***
*** Bug 522747 has been marked as a duplicate of this bug. ***
This bug is being reassigned to the "general" component so we can close the aisleriot bugzilla component. Apologies for the mass email!