I totally didn't nick half of this from the guessing game example

This commit is contained in:
Nox Sluijtman 2024-03-21 16:23:17 +01:00
parent 39d6f3a64c
commit 58a51a0da9

View file

@ -9,11 +9,11 @@ fn main() {
, "Friet"
, "Durum"
];
let secret_num = rand::thread_rng().gen_range(0..foods.len());
let rnd_num = rand::thread_rng().gen_range(0..foods.len());
let weekday = chrono::offset::Local::now().date_naive().weekday();
let output_string = match weekday {
chrono::Weekday::Tue => "Friet",
_ => foods[secret_num]
_ => foods[rnd_num]
};
println!("{}", output_string)
}