Created
March 29, 2015 23:58
-
-
Save pumpkincouture/6b2c2bb7cba739688d3f 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
| (def options-list (atom {:first-marker "first-marker" :second-marker "second-marker" :board "board" :first-type "first-type" :second-type "second-type"})) | |
| (def add-to-options (fn [symbol option] (swap! options-list assoc-in [symbol] option))) | |
| (defn get-first-player [] | |
| (ui/prompt-for-piece)) | |
| (defn get-second-player [] | |
| (ui/prompt-for-ai-piece)) | |
| (defn get-board [] | |
| (vec (range 1 (inc 9)))) | |
| (defn get-options [] | |
| (add-to-options :first-marker (get-first-player)) | |
| (add-to-options :second-marker (get-second-player)) | |
| (add-to-options :board (get-board)) | |
| (add-to-options :first-type "human") | |
| (add-to-options :second-type "ai")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment