I totally didn't nick half of this from the guessing game example
This commit is contained in:
parent
39d6f3a64c
commit
58a51a0da9
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue