fix klondike generation
This commit is contained in:
+2
-1
@@ -147,7 +147,8 @@ impl Klondike {
|
|||||||
|
|
||||||
// generate tableaus
|
// generate tableaus
|
||||||
let [t0, t1, t2, t3, t4, t5, t6, t7] = core::array::from_fn(|i| {
|
let [t0, t1, t2, t3, t4, t5, t6, t7] = core::array::from_fn(|i| {
|
||||||
let stack = deck.split_off(i).into();
|
let remaining = deck.split_off(i).into();
|
||||||
|
let stack = core::mem::replace(&mut deck, remaining);
|
||||||
let mut pile = Pile::new_face_down(stack);
|
let mut pile = Pile::new_face_down(stack);
|
||||||
pile.push(deck.pop().unwrap());
|
pile.push(deck.pop().unwrap());
|
||||||
pile
|
pile
|
||||||
|
|||||||
Reference in New Issue
Block a user