gnome-games r8679 - trunk/aisleriot/rules



Author: vpovirk
Date: Sat Feb  7 23:00:36 2009
New Revision: 8679
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8679&view=rev

Log:
aisleriot/rules/valentine.scm: Be more strict about allowing drops

It used to be possible to move a card onto the waste or the stock, as
long as the ranks and suit are correct. This change prevents that.
Dropping a card from one slot to the same slot is also no longer
allowed, as that would create an empty undo entry.


Modified:
   trunk/aisleriot/rules/valentine.scm

Modified: trunk/aisleriot/rules/valentine.scm
==============================================================================
--- trunk/aisleriot/rules/valentine.scm	(original)
+++ trunk/aisleriot/rules/valentine.scm	Sat Feb  7 23:00:36 2009
@@ -42,6 +42,8 @@
 
 (define (droppable? start-slot card-list end-slot)
   (and (not (empty-slot? end-slot))
+       (not (= start-slot end-slot))
+       (> end-slot 1)
        (= (get-suit (get-top-card end-slot))
 	  (get-suit (car card-list)))
        (= (get-value (get-top-card end-slot))



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