1use super::hazard;
2use super::error;
3
4use utils::app_config::AppConfig;
5use utils::error::Result;
6
7pub fn hazard() -> Result<()> {
9 let random_hazard: bool = hazard::generate_hazard()?;
11
12 if random_hazard {
13 println!("You got it right!");
14 } else {
15 println!("You got it wrong!");
16 }
17
18 Ok(())
19}
20
21pub fn config() -> Result<()> {
23 let config = AppConfig::fetch()?;
24 println!("{:#?}", config);
25
26 Ok(())
27}
28
29pub fn simulate_error() -> Result<()> {
31
32 log::info!("We are simulating an error");
34
35 error::simulate_error()?;
37
38 Ok(())
40}