Created
March 3, 2014 00:39
-
-
Save tarynsauer/9316419 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ;; tictactoe.core.clj | |
| (defn -main [] | |
| (play (new-board 9) (get-player (first piece)) (get-player (second piece)))) | |
| ;; tictactoe.game.clj | |
| (defn get-player [piece] | |
| (let [player-type (get-player-type piece)] | |
| (if (valid-type? player-type) | |
| (do {:piece piece :player-type player-type}) | |
| (recur piece)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment