gnome-games r7536 - in trunk/aisleriot: . rules
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r7536 - in trunk/aisleriot: . rules
- Date: Thu, 20 Mar 2008 23:29:16 +0000 (GMT)
Author: chpe
Date: Thu Mar 20 23:29:16 2008
New Revision: 7536
URL: http://svn.gnome.org/viewvc/gnome-games?rev=7536&view=rev
Log:
* rules/spider.scm: Don't allow moving non-uniformly suited card
stacks to foundation. Bug #443307, patch by Philippe Gauthier.
Modified:
trunk/aisleriot/ChangeLog
trunk/aisleriot/rules/spider.scm
Modified: trunk/aisleriot/rules/spider.scm
==============================================================================
--- trunk/aisleriot/rules/spider.scm (original)
+++ trunk/aisleriot/rules/spider.scm Thu Mar 20 23:29:16 2008
@@ -182,16 +182,17 @@
#t))))
-(define (is-playable-stack cards n)
+(define (is-playable-stack cards suit n)
(and (not (null? cards))
(= (get-value (car cards)) n)
(is-visible? (car cards))
+ (eq? (get-suit (car cards)) suit)
(or (= n 13)
- (is-playable-stack (cdr cards) (+ n 1)))))
+ (is-playable-stack (cdr cards) suit (+ n 1)))))
(define (button-double-clicked slot)
(and (member slot tableau)
- (is-playable-stack (get-cards slot) 1)
+ (is-playable-stack (get-cards slot) (get-suit (get-cards slot)) 1)
(let ((card-list (list-head (get-cards slot) 13)))
(remove-n-cards slot 13)
(complete-transaction slot card-list (find-empty-slot foundation)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]