 (defn parse-deck [side deck]
   (reduce #(if-let [card (parse-line side %2)] (conj %1 card) %1) [] (split-lines deck)))
 
-(defn faction-label [card]
+(defn faction-label
   "Returns faction of a card as a keyword"
+  [card]
   (-> card :faction .toLowerCase (.replace " " "-")))
 
-(defn allowed? [card {:keys [side faction title] :as identity}]
+(defn allowed?
   "Checks if a card is allowed in deck of a given identity - not accounting for influence"
+  [card {:keys [side faction title] :as identity}]
   (and (not= (:type card) "Identity")
        (= (:side card) side)
        (or (not= (:type card) "Agenda")

    (some #(when (and (not= (:setname %) "Alternates") (= (:title %) (:title card))) %)
          (:cards @app-state))
    card))

(defn octgn-link [owner]
  (let [deck (om/get-state owner :deck)

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

(defn id-inf-limit
  "Returns influence limit of an identity or INFINITY in case of draft IDs."
  [identity]
  (if (= (:setname identity) "Draft") INFINITY (:influencelimit identity)))

(defn mostwanted?
  "Returns true if card is on Most Wanted NAPD list."
  [card]
  (let [napdmwl '("Cerberus \"Lady\" H1" "Clone Chip" "Desperado" "Parasite" "Prepaid VoicePAD"
                   "Architect" "AstroScript Pilot Program" "Eli 1.0" "NAPD Contract" "SanSan City Grid")]
    (some #(= (:title card) %) napdmwl)))
