Re: sol and sol "game over" test



Good point. We'd better fix that.

Vincent Povirk



On Sun, Nov 9, 2008 at 7:13 PM, Rocky Bernstein
<rocky bernstein gmail com> wrote:
>
>
> 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)))))
>
> ;-)
>
>
> _______________________________________________
> Games-list mailing list
> Games-list gnome org
> http://mail.gnome.org/mailman/listinfo/games-list
>
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]