Created
March 2, 2017 21:08
-
-
Save deque-blog/3428159e9e958f96c1a6e0b6b5774cc8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn- get-winner-name | |
[turn] | |
(if-let [winner (turn/get-winner turn)] | |
(clojure.string/capitalize (name winner)))) | |
(defn get-title | |
[turn] | |
(if-let [winner-name (get-winner-name turn)] | |
(str winner-name " wins") | |
(if (turn/game-over? turn) | |
"Draw game" | |
"Tic Tac Toe"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment