Created
March 7, 2017 21:18
-
-
Save deque-blog/74cb41543663b39cea5450bd8a537cb5 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
(defn new-board | |
"Creates a new board with initial positions of each players" | |
[] | |
(->> | |
(conj player/all :wall) | |
(algo/randomly-pick-n-of-each cst/init-block-count coordinates) | |
(reduce | |
(fn [board [coord owner]] (convert-cell board coord owner)) | |
empty-board))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment