Skip to content

Instantly share code, notes, and snippets.

Created August 11, 2017 10:14
What would you like to do?
App Runner namespace, with parts of the code I haven't changed removed.
(:require clj-http.client :as client]))
; Code removed
(defn- api-call [board-state]
(let [result (client/post "" {:form-params {"boardState" (str board-state)} :content-type :json} )]
(read-string (get result :body))))
(defn- player-move [board-state player]
(case player
:human (human/choose-space)
:random-computer (random-computer/choose-space board-state)
:unbeatable-computer (api-call board-state)))
; Code removed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment