Skip to content

Instantly share code, notes, and snippets.

@tarynsauer
Created March 3, 2014 00:39
Show Gist options
  • Select an option

  • Save tarynsauer/9316419 to your computer and use it in GitHub Desktop.

Select an option

Save tarynsauer/9316419 to your computer and use it in GitHub Desktop.
;; 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