From 312fe0bfdee48c39419e9eaf1bf6171e4903ded4 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Thu, 13 Feb 2020 21:28:07 -0500 Subject: net: twelve/source.rkt: Fix won. --- net/ricketyspace/ror/twelve/source.rkt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/ricketyspace/ror/twelve/source.rkt b/net/ricketyspace/ror/twelve/source.rkt index cc6c366..dc37e87 100644 --- a/net/ricketyspace/ror/twelve/source.rkt +++ b/net/ricketyspace/ror/twelve/source.rkt @@ -291,7 +291,9 @@ ;; Which player has won the game -- eager is for N human players (define (won board) (define-values (best-score w) (winners board)) - (if (cons? (rest w)) "It's a tie." "You won.")) + (cond [(cons? (rest w)) "It's a tie."] + [(= (car w) AI) "AI won."] + [else "You won."])) ; ; -- cgit v1.2.3