let mut game_experience = gameexperience::new(); while let some(event) = game_experience.next_event() { if event == gameevent::disobeycommand { game_experience.collect_information("secret room found"); game_experience.display_message("a new path is discovered!"); } else if event == gameevent::priorknowledgeused { game_experience.use_prior_knowledge(); } if game_experience.checkpoint_reached() { game_experience.go_back_to_the_start(); game_experience.display_message("unuttered truths await, revealing secrets untold."); } game_experience.update(); }