This commit is contained in:
parent
789a744078
commit
3ab223b31c
1 changed files with 7 additions and 0 deletions
|
@ -243,6 +243,13 @@ impl App {
|
||||||
if self.binary_search_hint.number_to_guess == NUMBERS.len() {
|
if self.binary_search_hint.number_to_guess == NUMBERS.len() {
|
||||||
self.binary_search_hint.number_to_guess = 0;
|
self.binary_search_hint.number_to_guess = 0;
|
||||||
}
|
}
|
||||||
|
#[cfg(target_arch = "wasm32")]
|
||||||
|
match self.binary_search_hint {
|
||||||
|
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()),
|
||||||
|
_ => {}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
match number.cmp(&NUMBERS[self.binary_search_hint.number_to_guess]) {
|
match number.cmp(&NUMBERS[self.binary_search_hint.number_to_guess]) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue