[aisleriot] bakers-dozen: Use hint-move instead of get-name.
- From: Vincent Povirk <vpovirk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] bakers-dozen: Use hint-move instead of get-name.
- Date: Sat, 30 Jun 2012 00:33:50 +0000 (UTC)
commit 7b9aef617cb852e30eb06e7680f87f3662de59a5
Author: Vincent Povirk <madewokherd gmail com>
Date: Fri Jun 29 14:36:21 2012 -0500
bakers-dozen: Use hint-move instead of get-name.
For bug 551859.
games/bakers-dozen.scm | 53 ++++++++++++++++++++++-------------------------
1 files changed, 25 insertions(+), 28 deletions(-)
---
diff --git a/games/bakers-dozen.scm b/games/bakers-dozen.scm
index 4bc6bde..7602a40 100644
--- a/games/bakers-dozen.scm
+++ b/games/bakers-dozen.scm
@@ -26,29 +26,29 @@
(add-blank-slot)
(add-blank-slot)
- (add-normal-slot DECK)
+ (add-normal-slot DECK 'foundation)
(add-blank-slot)
- (add-normal-slot '())
+ (add-normal-slot '() 'foundation)
(add-blank-slot)
- (add-normal-slot '())
+ (add-normal-slot '() 'foundation)
(add-blank-slot)
- (add-normal-slot '())
+ (add-normal-slot '() 'foundation)
(add-carriage-return-slot)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
- (add-extended-slot '() down)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
+ (add-extended-slot '() down 'tableau)
(deal-cards-face-up 0 '(4 5 6 7 8 9 10 11 12 13 14 15 16 4 5 6 7 8 9
10 11 12 13 14 15 16))
@@ -152,16 +152,13 @@
((or (= f-slot 4)
(empty-slot? t-slot))
(foundation-possible? (+ 1 t-slot) 0))
- ((= (get-value (get-top-card t-slot)) ace)
- (list 2 (get-name (get-top-card t-slot)) (_"an empty foundation")))
- ((and (not (empty-slot? f-slot))
- (= (get-suit (get-top-card t-slot))
- (get-suit (get-top-card f-slot)))
- (= (get-value (get-top-card t-slot))
- (+ 1 (get-value (get-top-card f-slot)))))
- (list 1
- (get-name (get-top-card t-slot))
- (get-name (get-top-card f-slot))))
+ ((if (empty-slot? f-slot)
+ (= (get-value (get-top-card t-slot)) ace)
+ (and (= (get-suit (get-top-card t-slot))
+ (get-suit (get-top-card f-slot)))
+ (= (get-value (get-top-card t-slot))
+ (+ 1 (get-value (get-top-card f-slot))))))
+ (hint-move t-slot 1 f-slot))
(#t (foundation-possible? t-slot (+ 1 f-slot)))))
(define (card-to-foundation-possible? card f-slot)
@@ -188,7 +185,7 @@
(or (not (= (get-value (get-top-card slot2))
(get-value (cadr (get-cards slot1)))))
(card-to-foundation-possible? (cadr (get-cards slot1)) 0)))
- (list 1 (get-name (get-top-card slot1)) (get-name (get-top-card slot2))))
+ (hint-move slot1 1 slot2))
(#t (tableau-moves? slot1 (+ 1 slot2)))))
(define (get-hint)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]