Fixing crashes caused by misunderstanding cond

This commit is contained in:
Vivianne 2023-07-09 22:59:29 -07:00
parent 3e9d075cda
commit 43b7b94397
2 changed files with 4 additions and 4 deletions

View File

@ -14,8 +14,8 @@
(define %my-turn? first?)
(define (%state)
(cond
((board-winner? board mark) => 'won)
((board-winner? board peer-mark) => 'lost)
((board-winner? board mark) 'won)
((board-winner? board peer-mark) 'lost)
(else 'play)))
(define (signal-turn)
;; any better way to do this?

View File

@ -54,8 +54,8 @@
(define (%display b state)
(board-display b)
(cond
((eq? state 'won) => (format #t "*** I won! ***\n"))
((eq? state 'lost) => (format #t "*** I lost! ***\n"))))
((eq? state 'won) (format #t "*** I won! ***\n"))
((eq? state 'lost) (format #t "*** I lost! ***\n"))))
(define (begin-game-loop board controller my-turn+)
(define vat (spawn-vat #:name "UI"))