Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created March 26, 2017 13:37
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/aaa9b67f18eb9ca2f24335f044f7ec53 to your computer and use it in GitHub Desktop.
Save deque-blog/aaa9b67f18eb9ca2f24335f044f7ec53 to your computer and use it in GitHub Desktop.
(defn- human-player-winning?
[{:keys [blue red green] :as scores}]
(let [human-score (* 1.1 blue)]
(and (< red human-score) (< green human-score))))
(defn- limited-move-options?
[turn]
(< (count (turn/transitions turn)) 5))
(defn- in-late-game?
[scores]
(let [max-score (count board/coordinates)
sum-score (apply + (vals scores))]
(< (- max-score sum-score) 20)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment