Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save tarynsauer/9316365 to your computer and use it in GitHub Desktop.
(def x-player-type (atom "human"))
(def o-player-type (atom "human"))
(def player-types ["human" "computer" "ai"])
(defn current-player-type [board]
(if (= (current-player board) (first piece))
@x-player-type
@o-player-type))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment