Fixed waste display issue and added cards per draw
This commit is contained in:
@@ -203,8 +203,8 @@ pub struct Klondike {
|
||||
pub waste: Vec<Card>,
|
||||
pub foundation: [Vec<Card>; 4], // 4 = len of num suits
|
||||
_max_num_passes_through_deck: NumPassesThroughDeck,
|
||||
_current_num_passes_through_deck: u64,
|
||||
num_cards_turned: u8,
|
||||
pub current_num_passes_through_deck: u64,
|
||||
pub num_cards_turned: u8,
|
||||
}
|
||||
|
||||
impl Klondike {
|
||||
@@ -223,6 +223,7 @@ impl Klondike {
|
||||
} else {
|
||||
self.deck = self.waste.clone();
|
||||
self.waste = vec![];
|
||||
self.current_num_passes_through_deck += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -247,7 +248,7 @@ impl Default for Klondike {
|
||||
waste: Vec::new(),
|
||||
foundation: [Vec::new(), Vec::new(), Vec::new(), Vec::new()], // is this really the best way?
|
||||
_max_num_passes_through_deck: NumPassesThroughDeck::Unlimited,
|
||||
_current_num_passes_through_deck: 0,
|
||||
current_num_passes_through_deck: 0,
|
||||
num_cards_turned: 3,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user