[gnome-games] aisleriot: fix hinting in a rare situation in Spider



commit 65574b533b4868ca8aac688c9789ff131a0a9776
Author: Vincent Povirk <madewokherd gmail com>
Date:   Sun Jul 5 10:22:42 2009 -0500

    aisleriot: fix hinting in a rare situation in Spider
    
    If a visible card covers an invisible card of the same suit and a value
    greater by one, the hint function would never suggest moving it, even when
    it is possible to do so. This commit fixes that problem.

 aisleriot/rules/spider.scm |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/aisleriot/rules/spider.scm b/aisleriot/rules/spider.scm
index 1160e71..817c0a1 100644
--- a/aisleriot/rules/spider.scm
+++ b/aisleriot/rules/spider.scm
@@ -262,6 +262,7 @@
       #f
       (if (and (not (empty-slot? (car slots)))
 	       (or (= 1 (length (depth-card (get-cards (car slots)))))
+	           (not (is-visible? (cadr (depth-card (get-cards (car slots))))))
 		   (not (eq? (+ 1 (get-value (car (depth-card (get-cards (car slots))))))
 			     (get-value (cadr (depth-card (get-cards (car slots))))))))
 	       (check-a-slot (car slots) (car (depth-card (get-cards (car slots)))) tableau #f))



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