Started on separating domain and adapters

This commit is contained in:
2025-05-14 07:41:28 +02:00
parent 4e26d3cdcb
commit c994321576
15 changed files with 541 additions and 702 deletions

View File

@@ -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
}
}