Commit 7150fe9c authored by Vincent Povirk's avatar Vincent Povirk

neighbor: Use hint-move instead of get-name.

For bug 551859.
parent 73bb67f4
......@@ -137,9 +137,15 @@
(and (not (game-won))
(get-hint)))
(define (hint-remove-king suit)
(cond ((eq? suit club) (_"Remove the king of clubs."))
((eq? suit diamond) (_"Remove the king of diamonds."))
((eq? suit heart) (_"Remove the king of hearts."))
((eq? suit spade) (_"Remove the king of spades."))))
(define (king-check slot-id)
(cond ((= king (get-value (get-top-card slot-id)))
(list 2 (get-name (get-top-card slot-id)) (_"itself")))
(hint-click slot-id (hint-remove-king (get-suit (get-top-card slot-id)))))
((and (< slot-id 25)
(not (empty-slot? (+ 1 slot-id))))
(king-check (+ 1 slot-id)))
......@@ -149,8 +155,7 @@
(cond ((and (not (= 0 (modulo slot-id 5)))
(= 13 (+ (get-value (get-top-card slot-id))
(get-value (get-top-card (+ 1 slot-id))))))
(list 1 (get-name (get-top-card slot-id))
(get-name (get-top-card (+ 1 slot-id)))))
(hint-move slot-id 1 (+ 1 slot-id)))
((and (< slot-id 24)
(not (empty-slot? (+ 2 slot-id))))
(horizontal-check (+ 1 slot-id)))
......@@ -159,8 +164,7 @@
(define (vertical-check slot-id)
(cond ((= 13 (+ (get-value (get-top-card slot-id))
(get-value (get-top-card (+ 5 slot-id)))))
(list 1 (get-name (get-top-card slot-id))
(get-name (get-top-card (+ 5 slot-id)))))
(hint-move slot-id 1 (+ 5 slot-id)))
((and (< slot-id 19)
(not (empty-slot? (+ 6 slot-id))))
(vertical-check (+ 1 slot-id)))
......@@ -170,8 +174,7 @@
(cond ((and (not (= 0 (modulo slot-id 5)))
(= 13 (+ (get-value (get-top-card slot-id))
(get-value (get-top-card (+ 6 slot-id))))))
(list 1 (get-name (get-top-card slot-id))
(get-name (get-top-card (+ 6 slot-id)))))
(hint-move slot-id 1 (+ 6 slot-id)))
((and (not (empty-slot? (+ 7 slot-id)))
(< slot-id 18))
(backslash-check (+ 1 slot-id)))
......@@ -181,8 +184,7 @@
(cond ((and (not (= 1 (modulo slot-id 5)))
(= 13 (+ (get-value (get-top-card slot-id))
(get-value (get-top-card (+ 4 slot-id))))))
(list 1 (get-name (get-top-card slot-id))
(get-name (get-top-card (+ 4 slot-id)))))
(hint-move slot-id 1 (+ 4 slot-id)))
((and (< slot-id 19)
(not (empty-slot? (+ 5 slot-id))))
(slash-check (+ 1 slot-id)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment