forked from Roflin/gamenight
Started on separating domain and adapters
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
|
||||
use crate::domain::gamenight::Gamenight;
|
||||
use inquire::Select;
|
||||
|
||||
use crate::{domain::gamenight::Gamenight, flows::exit::Exit};
|
||||
|
||||
use super::*;
|
||||
|
||||
@@ -21,8 +23,13 @@ impl<'a> Flow<'a> for ViewGamenight {
|
||||
async fn run(&self, state: &'a mut GamenightState) -> FlowResult<'a> {
|
||||
|
||||
print!("{}", self.gamenight);
|
||||
let options: Vec<Box<dyn Flow<'a> + Send>> = vec![
|
||||
Box::new(Exit::new())
|
||||
];
|
||||
let choice = Select::new("What do you want to do:", options)
|
||||
.prompt_skippable()?;
|
||||
|
||||
Ok((FlowOutcome::Successful, state))
|
||||
handle_choice_option(&choice, self, state).await
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user