[aisleriot] bristol: Use hint-move instead of get-name.
- From: Vincent Povirk <vpovirk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aisleriot] bristol: Use hint-move instead of get-name.
- Date: Sun, 20 Nov 2011 04:05:25 +0000 (UTC)
commit 0c98d7b7db0ef66370506c73f18209abaf9086a8
Author: Vincent Povirk <madewokherd gmail com>
Date: Sat Nov 19 16:33:12 2011 -0600
bristol: Use hint-move instead of get-name.
For bug 551859.
games/bristol.scm | 48 ++++++++++++++++++++----------------------------
1 files changed, 20 insertions(+), 28 deletions(-)
---
diff --git a/games/bristol.scm b/games/bristol.scm
index 4e2b7e4..354c8e0 100644
--- a/games/bristol.scm
+++ b/games/bristol.scm
@@ -20,45 +20,45 @@
(make-standard-deck)
(shuffle-deck)
- (add-normal-slot DECK)
+ (add-normal-slot DECK 'stock)
(set! HORIZPOS (+ HORIZPOS 0.75))
- (add-normal-slot '())
- (add-normal-slot '())
- (add-normal-slot '())
+ (add-normal-slot '() 'reserve)
+ (add-normal-slot '() 'reserve)
+ (add-normal-slot '() 'reserve)
(set! HORIZPOS (+ HORIZPOS 0.75))
- (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-carriage-return-slot)
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(set! HORIZPOS (+ HORIZPOS 0.75))
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(set! HORIZPOS (+ HORIZPOS 0.75))
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(set! HORIZPOS (+ HORIZPOS 0.75))
- (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)
(set! HORIZPOS (+ HORIZPOS 0.75))
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(set! HORIZPOS (+ HORIZPOS 0.75))
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(add-blank-slot)
(set! HORIZPOS (+ HORIZPOS 0.75))
- (add-extended-slot '() right)
+ (add-extended-slot '() right 'tableau)
(deal-cards-face-up 0 '(8 9 10 11 12 13 14 15
8 9 10 11 12 13 14 15
@@ -188,15 +188,11 @@
#f
(cond ((and (empty-slot? foundation-id)
(= (get-value (get-top-card slot-id)) ace))
- (list 2
- (get-name (get-top-card slot-id))
- (_"an empty foundation pile")))
+ (hint-move slot-id 1 foundation-id))
((and (not (empty-slot? foundation-id))
(= (+ 1 (get-value (get-top-card foundation-id)))
(get-value (get-top-card slot-id))))
- (list 1
- (get-name (get-top-card slot-id))
- (get-name (get-top-card foundation-id))))
+ (hint-move slot-id 1 foundation-id))
(#t (check-a-foundation slot-id (+ 1 foundation-id))))))
(define (check-to-foundations slot-id)
@@ -236,17 +232,13 @@
(= (+ 1 (get-value (car card-list)))
(get-value (get-top-card slot2))))
(if (= depth 1)
- (list 1
- (get-name (get-top-card slot1))
- (get-name (get-top-card slot2)))
+ (hint-move slot1 1 slot2)
(and (check-a-tslot slot1
(cdr card-list)
(- depth 1)
8)
- (list 1
- (get-name (get-top-card slot1))
- (get-name (get-top-card slot2)))))
+ (hint-move slot1 1 slot2)))
(check-a-tslot slot1 card-list depth (+ 1 slot2)))))
(define (check-tableau slot-id)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]