Skip to content

Commit

Permalink
Merge pull request #4373 from NoahTheDuke/nb/clean-up-move-zone
Browse files Browse the repository at this point in the history
Clean up move-zone
  • Loading branch information
NoahTheDuke authored Aug 12, 2019
2 parents 157ff89 + 41173a7 commit dc02aa0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/clj/game/core/cards.clj
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,8 @@
"Moves all cards from one zone to another, as in Chronos Project."
[state side server to]
(when-not (seq (get-in @state [side :locked server]))
(let [from-zone (cons side (if (sequential? server) server [server]))
to-zone (cons side (if (sequential? to) to [to]))]
(swap! state assoc-in to-zone (concat (get-in @state to-zone)
(zone to (get-in @state from-zone))))
(swap! state assoc-in from-zone []))))
(doseq [card (get-in @state [side server])]
(move state side card to))))

(defn add-prop
"Adds the given value n to the existing value associated with the key in the card.
Expand Down

0 comments on commit dc02aa0

Please sign in to comment.