Print secret code to console :(
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
ec73f10840
commit
789a744078
1 changed files with 9 additions and 1 deletions
|
@ -297,13 +297,21 @@ struct BinarySearchHint {
|
|||
|
||||
impl Default for BinarySearchHint {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
let this = Self {
|
||||
numbers_guessed: heapless::Vec::new(),
|
||||
range: 0..10,
|
||||
guess_hint: None,
|
||||
number_to_guess: OsRng.unwrap_err().random_range(0..2),
|
||||
failed_guesses: 0,
|
||||
};
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
match this.number_to_guess {
|
||||
0 => ratzilla::web_sys::console::log_1(&"Secret code: 5210".into()),
|
||||
1 => ratzilla::web_sys::console::log_1(&"Secret code: 5234".into()),
|
||||
2 => ratzilla::web_sys::console::log_1(&"Secret code: 5789".into()),
|
||||
_ => {}
|
||||
}
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue