gnome-games r8891 - trunk/aisleriot/rules



Author: vpovirk
Date: Wed Mar 25 04:44:09 2009
New Revision: 8891
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8891&view=rev

Log:
aisleriot: do not add empty moves when double-clicks fail in Canfield

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	Wed Mar 25 04:44:09 2009
@@ -193,12 +193,12 @@
 	  (place-found slot top-card (+ search 1)))))
 
 (define (button-double-clicked slot)
-  (if (and (or (> slot 5) (eq? slot 1))
-	   (not (empty-slot? slot)))
-      (let ((top-card (get-top-card slot)))
-	(if (eq? (get-value top-card) BASE-VAL)
-	    (place-ace top-card slot)
-	    (place-found slot top-card 2)))))
+  (and (or (> slot 5) (eq? slot 1))
+       (not (empty-slot? slot))
+       (let ((top-card (get-top-card slot)))
+         (if (eq? (get-value top-card) BASE-VAL)
+             (place-ace top-card slot)
+             (place-found slot top-card 2)))))
 
 (define (game-over)
   (and (or (get-valid-move '(6 7 8 9 10 1))



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