[aisleriot] forty_thieves: Use hint-move instead of get-name.
- From: Vincent Povirk <vpovirk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] forty_thieves: Use hint-move instead of get-name.
- Date: Sun, 20 Nov 2011 04:05:10 +0000 (UTC)
commit a34062ba872baccce73e0edfdea5eb126a6a890d
Author: Vincent Povirk <madewokherd gmail com>
Date: Sat Nov 19 14:31:20 2011 -0600
forty_thieves: Use hint-move instead of get-name.
For bug 551859.
games/forty_thieves.scm | 59 +++++++++++++++++-----------------------------
1 files changed, 22 insertions(+), 37 deletions(-)
---
diff --git a/games/forty_thieves.scm b/games/forty_thieves.scm
index 6c66028..f6341ca 100644
--- a/games/forty_thieves.scm
+++ b/games/forty_thieves.scm
@@ -20,35 +20,35 @@
(make-standard-double-deck)
(shuffle-deck)
- (add-normal-slot DECK)
+ (add-normal-slot DECK 'stock)
(add-blank-slot)
; the foundations
- (add-normal-slot '())
- (add-normal-slot '())
- (add-normal-slot '())
- (add-normal-slot '())
- (add-normal-slot '())
- (add-normal-slot '())
- (add-normal-slot '())
- (add-normal-slot '())
+ (add-normal-slot '() 'foundation)
+ (add-normal-slot '() 'foundation)
+ (add-normal-slot '() 'foundation)
+ (add-normal-slot '() 'foundation)
+ (add-normal-slot '() 'foundation)
+ (add-normal-slot '() 'foundation)
+ (add-normal-slot '() 'foundation)
+ (add-normal-slot '() 'foundation)
(add-carriage-return-slot)
; the waste pile
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'waste)
(add-carriage-return-slot)
; the tableau
- (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)
; these are the forty theives in the tableau
(deal-cards-face-up 0 '(10 11 12 13 14 15 16 17 18 19))
@@ -374,25 +374,10 @@
)
)
-; turn a 'move' into a text description for get-hint.
-(define (make-destination-hint slot)
- (if (in-foundation? slot)
- (if (empty-slot? slot)
- (_"an empty foundation")
- (get-name (get-top-card slot))
- )
- (if (empty-slot? slot)
- (_"an empty space")
- (get-name (get-top-card slot))
- )
- )
-)
(define (make-hint move)
- (if (car move)
- (list 2 (get-name (get-top-card (car (cdr move))))
- (make-destination-hint (car (reverse move)))
- )
+ (if (car move)
+ (hint-move (car (cdr move)) 1 (car (reverse move)))
(list 0 "Bug! make-hint called on false move.")
)
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]