Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created March 7, 2017 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/74cb41543663b39cea5450bd8a537cb5 to your computer and use it in GitHub Desktop.
Save deque-blog/74cb41543663b39cea5450bd8a537cb5 to your computer and use it in GitHub Desktop.
(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