Commit 43c53e11 authored by Callum McKenzie's avatar Callum McKenzie

Fix for scorpion and odd cases where a face-down card was taken to be visible.

parent 4aefe54f
2005-01-12 Callum McKenzie <callum@physics.otago.ac.nz>
* rules/scorpion.scm: Simplify the game-over check and make
correct-sequence check for card visibility. This has the effect of
fixing bug #162917 where a flipped-over king was incorrectly
assumed to be part of the a sequence.
2005-01-03 Richard Hoelscher <rah@rahga.com> 2005-01-03 Richard Hoelscher <rah@rahga.com>
* card.c (get_preimage): Preimage API update, uri -> file. * card.c (get_preimage): Preimage API update, uri -> file.
......
...@@ -75,7 +75,8 @@ ...@@ -75,7 +75,8 @@
(define (correct-sequence card-list) (define (correct-sequence card-list)
(or (= (length card-list) 1) (or (= (length card-list) 1)
(and (eq? (get-suit (car card-list)) (and (is-visible? (cadr card-list))
(eq? (get-suit (car card-list))
(get-suit (cadr card-list))) (get-suit (cadr card-list)))
(= (+ 1 (get-value (car card-list))) (= (+ 1 (get-value (car card-list)))
(get-value (cadr card-list))) (get-value (cadr card-list)))
...@@ -131,15 +132,8 @@ ...@@ -131,15 +132,8 @@
(define (game-continuable) (define (game-continuable)
(get-hint)) (get-hint))
(define (check-wonness slot-id)
(or (= slot-id 8)
(and (or (empty-slot? slot-id)
(and (= (length (get-cards slot-id)) 13)
(correct-sequence (get-cards slot-id))))
(check-wonness (+ 1 slot-id)))))
(define (game-won) (define (game-won)
(check-wonness 1)) (eq? (get-score) 100))
(define (dealable?) (define (dealable?)
(and (not (empty-slot? 0)) (and (not (empty-slot? 0))
......
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