fix stupid stuff, plus make purple a little more different than brown

This commit is contained in:
Robby Findler 2011-01-10 12:19:20 -06:00
parent 2553553f09
commit f86fbad226

View File

@ -15,7 +15,7 @@
(define board-width 20) (define board-width 20)
(define board-height 10) (define board-height 10)
(define colors (map (lambda (x) (make-object color% x)) (define colors (map (lambda (x) (make-object color% x))
(list "blue" "red" "brown" "forestgreen" "darkviolet"))) (list "blue" "red" "brown" "forestgreen" "purple")))
(define pale-colors (map (λ (x) (define pale-colors (map (λ (x)
(define (paleize x) (- 255 (floor (/ (- 255 x) 2)))) (define (paleize x) (- 255 (floor (/ (- 255 x) 2))))
(make-object color% (make-object color%
@ -45,20 +45,7 @@
board-height board-height
(lambda (j) (lambda (j)
(vector (vector
(begin (random (length colors))
(if (zero? (modulo (+ j i) 4))
0
1)
#;
(if (zero? (modulo (+ j i) 2))
0
1)
#;
(if (= j (- board-height 1))
(- (length colors) 1)
(modulo i (- (length colors) 1)))
;0
#;(random (length colors)))
#f)))))) #f))))))
(define board (build-board)) (define board (build-board))
@ -421,6 +408,4 @@
(send canvas min-width (* board-width cell-w 2)) (send canvas min-width (* board-width cell-w 2))
(send canvas min-height (* board-height cell-h 2)) (send canvas min-height (* board-height cell-h 2))
(send frame show #t) (send frame show #t)
(yield semaphore))) (void (yield semaphore))))
(invoke-unit game@)