 (defn speculate
   "Make a play, but store the previous game state so the 'play' can be easily reverted"
   [game cell subcell]
-  (-> game
-    (play cell subcell)
-    (assoc :base game)))
+  (binding [*speculative* true]
+    (-> game
+      (play cell subcell)
+      (assoc :base game))))
 
 (defn unspeculate
   "Restore the previous game state (if there was one)."


(def num-cells 9)
(def num-players 2)

(comment
  ;; Game Data Structures

(defn legal-spooky-mark?
  "Return true if a spooky mark can be placed on the given cell and subcell"
  [game cell subcell]
  (and
    (not= cell (first (:pair game)))
    (nil? (get-in game [:board cell :entanglements subcell]))))

(defn check-collapses
  "Given a game, check if there are any collapses happening
