[aisleriot] fortress: Use hint-move instead of get-name.
- From: Vincent Povirk <vpovirk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] fortress: Use hint-move instead of get-name.
- Date: Mon, 28 May 2012 22:41:14 +0000 (UTC)
commit 8232ed306295fc2493ecf0dfb167a56dd2239830
Author: Vincent Povirk <madewokherd gmail com>
Date: Mon May 28 13:13:08 2012 -0500
fortress: Use hint-move instead of get-name.
For bug 551859.
games/fortress.scm | 45 +++++++++++++++++++++------------------------
1 files changed, 21 insertions(+), 24 deletions(-)
---
diff --git a/games/fortress.scm b/games/fortress.scm
index ffc2d45..366cc8c 100644
--- a/games/fortress.scm
+++ b/games/fortress.scm
@@ -16,59 +16,62 @@
(use-modules (aisleriot interface) (aisleriot api))
+(define foundation '(3 6 9 12))
+(define tableau '(0 1 2 4 5 7 8 10 11 13))
+
(define (new-game)
(initialize-playing-area)
(set-ace-low)
(make-standard-deck)
(shuffle-deck)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(add-blank-slot)
(add-blank-slot)
(add-blank-slot)
(add-blank-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-carriage-return-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(add-blank-slot)
(add-blank-slot)
- (add-normal-slot DECK)
+ (add-normal-slot DECK 'foundation)
(add-blank-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-carriage-return-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(add-blank-slot)
(add-blank-slot)
- (add-normal-slot '())
+ (add-normal-slot '() 'foundation)
(add-blank-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-carriage-return-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(add-blank-slot)
(add-blank-slot)
- (add-normal-slot '())
+ (add-normal-slot '() 'foundation)
(add-blank-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-carriage-return-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(add-blank-slot)
(add-blank-slot)
- (add-normal-slot '())
+ (add-normal-slot '() 'foundation)
(add-blank-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(deal-cards-face-up 3 '(0 2 5 8 11 1 4 7 10 13 0 2 5 8 11 1 4 7 10 13 0 2 5 8 11 1 4 7 10 13 0 2 5 8 11 1 4 7 10 13 0 2 5 8 11 1 4 7 10 13 0 1))
@@ -161,17 +164,13 @@
((and (empty-slot? f-slot)
(= (get-value (get-top-card slot))
ace))
- (list 2
- (get-name (get-top-card slot))
- (_"an empty foundation")))
+ (hint-move slot 1 f-slot))
((and (not (empty-slot? f-slot))
(= (get-suit (get-top-card f-slot))
(get-suit (get-top-card slot)))
(= (get-value (get-top-card slot))
(+ 1 (get-value (get-top-card f-slot)))))
- (list 1
- (get-name (get-top-card slot))
- (get-name (get-top-card f-slot))))
+ (hint-move slot 1 f-slot))
(#t (to-foundations? slot (+ 3 f-slot)))))
(define (to-tableau? slot1 slot2)
@@ -195,9 +194,7 @@
(+ 1 (get-value (get-top-card slot2))))
(= (get-value (get-top-card slot2))
(+ 1 (get-value (get-top-card slot1))))))
- (list 1
- (get-name (get-top-card slot1))
- (get-name (get-top-card slot2))))
+ (hint-move slot1 1 slot2))
(#t
(to-tableau? slot1 (+ 1 slot2)))))
@@ -212,7 +209,7 @@
(empty-slot? 10)
(empty-slot? 11)
(empty-slot? 13))
- (list 0 (_"Move something into the empty Tableau slot"))))
+ (list 0 (_"Move something onto an empty tableau slot."))))
(define (get-hint)
(or (to-foundations? 0 3)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]