Day 11/100: Shut the Box in Racket

Today I had the brilliant idea to do my standard "Hello World" program in Scheme / Racket. So, I present to you the first bits of "Shut the Box" in Racket:

(define tiles `(1 2 3 4 5 6 7 8 9))
(define die1 (+ 1 (random 6)))
(define die2 (+ 1 (random 6)))
(define roll (+ die1 die2))

(define tilelist 4)

(if (index-of tiles tilelist)
(set! tiles (remove tilelist tiles))
("Tile already shut"))

More later as I figure things out.


links

social