gnome-games r9048 - trunk/aisleriot/rules



Author: vpovirk
Date: Mon Apr 13 05:09:22 2009
New Revision: 9048
URL: http://svn.gnome.org/viewvc/gnome-games?rev=9048&view=rev

Log:
aisleriot: forbid picking up base cards from the foundations in Canfield

Dropping a base card from the foundation was never really allowed by
complete-transaction, and the attempt creates an empty undo entry. So
we shouldn't even allow dragging them.

This fixes a test failure (see bug 569936).


Modified:
   trunk/aisleriot/rules/canfield.scm

Modified: trunk/aisleriot/rules/canfield.scm
==============================================================================
--- trunk/aisleriot/rules/canfield.scm	(original)
+++ trunk/aisleriot/rules/canfield.scm	Mon Apr 13 05:09:22 2009
@@ -92,15 +92,13 @@
 	 #f)
 	((and (= slot-id 1) (> (length card-list) 1))
 	 #f)
+        ((and (> slot-id 1)
+              (< slot-id 6)
+              (= BASE-VAL (get-value (car card-list))))
+         #f)
 	(else
-	 (if card-list
-	     (if (is-visible? (car (reverse card-list)))
-		 (if (and (= slot-id 2)
-			  (= (length (get-cards 2)) 1))
-		     #f
-		     #t)
-		 #f)
-	     #f))))
+	 (and card-list
+	      (is-visible? (car (reverse card-list)))))))
 
 (define (complete-transaction start-slot card-list end-slot)
   (if (and (> start-slot 1)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]