Print secret code to console :|
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Isaac Mills 2025-07-22 18:22:14 -06:00
parent 789a744078
commit 3ab223b31c
Signed by: fnmain
GPG key ID: B67D7410F33A0F61

View file

@ -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]) {