 
 (def select-channel (chan))
 (def zoom-channel (chan))
+(def INFINITY 2147483647)
 
 (defn identical-cards? [cards]
   (let [name (:title (first cards))]


(defn found? [query cards]
  (some #(if (= (.toLowerCase (:title %)) query) %) cards))

(defn search [query cards]
  (filter #(if (= (.indexOf (.toLowerCase (:title %)) query) -1) false true) cards))


(defn valid? [{:keys [identity cards] :as deck}]
  (and (>= (card-count cards) (:minimumdecksize identity))
       (<= (influence deck) (influencelimit identity))
       (every? #(and (allowed? (:card %) identity)
                     (<= (:qty %) (or (get-in % [:card :limited]) 3))) cards)
       (or (= (:side identity) "Runner")
