 
 
 ;; -----------------------------------------
+;; EXTRINSIC TYPES
+;; -----------------------------------------
+
+(def player? (set players))
+(def cell-types? (conj player? :wall :empty))
+
+
+;; -----------------------------------------
 ;; UTILS
 ;; -----------------------------------------
 
 (defn fast-max-key
   "Fast max key that avoids recomputing things several times"
+  {:pre [(fn? key-fn) (seq? coll)]}
   [key-fn coll]
   (apply max-key (memoize key-fn) coll))
 

    [clojure.string :as str]))

(enable-console-print!)

;; TODO - Try to plug the history of brower for "back"
;; TODO - Try to bring some domain vocabular here: it gets too complicated to trace

  "[SIMPLISTIC] Return the best move for a player based on:
   * The immediate gain
   * The worse immediate lost afterwards"
  {:pre (player? player)}
  [game player]
  (let [moves (get-in game [:moves player])
        others (remove #{player} players)]
