
* Another big chunk of v4-require-isms * Allow `#lang framework/keybinding-lang' for keybinding files * Move hierlist sources into "mrlib/hierlist", leave stub behind svn: r10689
23 lines
556 B
Scheme
23 lines
556 B
Scheme
#cs(module master-play mzscheme
|
|
(require
|
|
"master.ss"
|
|
lang/prim)
|
|
|
|
(provide go)
|
|
(define-primitive go go/proc)
|
|
|
|
(define (compare choice1 choice2 guess1 guess2)
|
|
(cond
|
|
[(and (eq? choice1 guess1) (eq? choice2 guess2))
|
|
'perfect!]
|
|
[(or (eq? choice1 guess1) (eq? choice2 guess2))
|
|
'one_color_is_at_proper_place]
|
|
[(or (eq? choice2 guess1) (eq? choice1 guess2))
|
|
'one_color_occurs]
|
|
[else
|
|
'sorry_all_wrong]))
|
|
|
|
(define (go/proc s)
|
|
(printf "Have fun playing, ~a~n" s)
|
|
(master compare)))
|