Re: sol and sol "game over" test
- From: "Rocky Bernstein" <rocky bernstein gmail com>
- To: games-list gnome org
- Subject: Re: sol and sol "game over" test
- Date: Sun, 9 Nov 2008 20:13:08 -0500
On Sun, Nov 9, 2008 at 1:28 PM, Vincent Povirk
<madewokherd+8cd9 gmail com> wrote:
...
There is a way to do your test without repeating yourself:
...
The way you wrote it would break for other games that import
klondike.scm but use different slot numbers and configurations for the
tableau piles.
Looks like the test in the existing code suffers this problem:
(define (game-won)
(and (= 13 (length (get-cards 2)))
(= 13 (length (get-cards 3)))
(= 13 (length (get-cards 4)))
(= 13 (length (get-cards 5)))))
;-)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]