Re: sol and sol "game over" test





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]