gnome-games r9056 - trunk/aisleriot



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

Log:
aisleriot: add some direct card comparison utilities to sol.scm


Modified:
   trunk/aisleriot/sol.scm

Modified: trunk/aisleriot/sol.scm
==============================================================================
--- trunk/aisleriot/sol.scm	(original)
+++ trunk/aisleriot/sol.scm	Mon Apr 13 05:10:27 2009
@@ -329,6 +329,15 @@
 	(car cards))))
 
 ;; Utilities - need more of these:
+(define (suit-eq? card1 card2)
+  (eq? (get-suit card1) (get-suit card2)))
+
+(define (color-eq? card1 card2)
+  (eq? (get-color card1) (get-color card2)))
+
+(define (value-eq? card1 card2)
+  (eq? (get-value card1) (get-value card2)))
+
 (define (cards-eq? card1 card2)
   (and (eq? (get-value card1) (get-value card2))
        (eq? (get-suit card1) (get-suit card2))))



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