gnome-games r8897 - trunk/aisleriot/rules



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

Log:
aisleriot: don't add empty moves when dealing fails in Labyrinth

Before this change, clicking on an empty stock would add an empty move
to the history.

This fixes a test failure (see bug 569936).


Modified:
   trunk/aisleriot/rules/labyrinth.scm

Modified: trunk/aisleriot/rules/labyrinth.scm
==============================================================================
--- trunk/aisleriot/rules/labyrinth.scm	(original)
+++ trunk/aisleriot/rules/labyrinth.scm	Wed Mar 25 05:16:09 2009
@@ -102,8 +102,7 @@
        (add-to-score! 1)))
  
 (define (check-slot-and-deal slot)
-  (cond ((or (empty-slot? 0)
-	     (= slot 21))
+  (cond ((= slot 21)
 	 #t)
 	((empty-slot? (- slot 8))
 	 (and (deal-cards-face-up 0 (list (- slot 8)))
@@ -113,6 +112,7 @@
 
 (define (button-clicked slot-id)
   (and (= slot-id 0)
+       (not (empty-slot? 0))
        (set! first-row #f)
        (check-slot-and-deal 13)))
 



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