Possibly improve color choices

This commit is contained in:
2024-02-08 13:12:34 -08:00
parent 3d6e171caa
commit 5dc6f763cd
5 changed files with 17 additions and 7 deletions

View File

@ -12,20 +12,20 @@ mod zobrist;
fn main() {
/*
let ruleset = Ruleset {
n_slots: 11,
n_suits: 5,
n_cards_per_suit: 10,
n_arcana: 25
};
*/
/*
let ruleset = Ruleset {
n_slots: 11,
n_suits: 4,
n_cards_per_suit: 13,
n_arcana: 22
};
*/
/*
let ruleset = Ruleset {
n_slots: 5,

View File

@ -1,6 +1,6 @@
use rand::{seq::SliceRandom, Rng};
use crate::ruleset::{Card, Setup};
use crate::ruleset::{self, Card, Setup};
pub struct Deal {
pub slots: Vec<Vec<Card>>,
@ -53,7 +53,9 @@ impl Deal {
shuffles = extra_shuf
}
}
for _ in shuffles..2 {
// TODO: Use this in the game too
let max_shuffles = 2; // if setup.ruleset.n_suits < 5 { 2 } else { 1 };
for _ in shuffles..max_shuffles {
slots.choose_mut(rng).unwrap().shuffle(rng);
}