From 3ab223b31cd9db1e731f07992e68ebaf5c12e1bb Mon Sep 17 00:00:00 2001 From: Isaac Mills Date: Tue, 22 Jul 2025 18:22:14 -0600 Subject: [PATCH] Print secret code to console :| --- thecockpit/src/app.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/thecockpit/src/app.rs b/thecockpit/src/app.rs index 13a839e..d966c9c 100644 --- a/thecockpit/src/app.rs +++ b/thecockpit/src/app.rs @@ -243,6 +243,13 @@ impl App { if self.binary_search_hint.number_to_guess == NUMBERS.len() { 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; } match number.cmp(&NUMBERS[self.binary_search_hint.number_to_guess]) {