Skip to content

Instantly share code, notes, and snippets.

@tarynsauer
Created February 24, 2014 02:53
Show Gist options
  • Select an option

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

Select an option

Save tarynsauer/9181183 to your computer and use it in GitHub Desktop.
(def x-player-type (atom "human"))
(def o-player-type (atom "human"))
(defn update-player-types [player-piece new-type]
(if (= player-piece (first piece)) ;; (first piece) is "X"
(reset! x-player-type new-type)
(reset! o-player-type new-type)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment