Created
March 1, 2017 20:40
-
-
Save deque-blog/c039a7725013183e35581150367b13f9 to your computer and use it in GitHub Desktop.
This file contains 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 next-turn | |
"Convert a cell to the player color and switch player" | |
[turn coord] | |
(if-not (or (game-over? turn) (invalid-move? turn coord)) | |
(-> turn | |
(update :board board/convert-cell (:player turn) coord) | |
(update :player next-player)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment