Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/clj/game/core/set_up.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[game.core.prompts :refer [clear-wait-prompt show-prompt show-wait-prompt]]
[game.core.quick-draft :refer [check-quick-draft]]
[game.core.say :refer [system-msg system-say implementation-msg]]
[game.core.shuffling :refer [shuffle-into-deck]]
[game.core.shuffling :refer [shuffle-into-deck shuffle-coll]]
[game.core.state :refer [new-state]]
[game.macros :refer [wait-for]]
[game.quotes :as quotes]
Expand All @@ -28,8 +28,9 @@
"Creates a shuffled draw deck (R&D/Stack) from the given list of cards.
Loads card data from the server-card map if available."
[deck]
(shuffle (mapcat #(map build-card (repeat (:qty %) (assoc (:card %) :art (:art %))))
(shuffle (vec (:cards deck))))))
(->> deck :cards vec
(mapcat #(map build-card (repeat (:qty %) (assoc (:card %) :art (:art %)))))
shuffle-coll vec))

;;; Functions for the creation of games and the progression of turns.
(defn mulligan
Expand Down
2 changes: 1 addition & 1 deletion src/clj/game/core/shuffling.clj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
(.setSeed rand seed-bytes)
rand))

(defn- shuffle-coll
(defn shuffle-coll
;; Ref: https://github.com/clojure/clojure/blob/ce55092f2b2f5481d25cff6205470c1335760ef6/src/clj/clojure/core.clj#L7342
;; we're just substituting in a good rng source (1024 bits of entropy) rather than the default used by java (40 bits of entropy)
;; this should theoretically be invisible, since any random slice of the possible sets of deck orderings is also random,
Expand Down
Loading