use enum_dispatch::enum_dispatch;
use crate::{game_state::GameState, pid::Pid, act::Act, action_generator::ActionGenerator};
#[enum_dispatch(PhaseTrait)]
pub enum Phase {
CardsSelectPhase,
}
#[enum_dispatch]
trait PhaseTrait {
fn step(&self, state: &GameState) -> GameState;
fn step_action(&self, state: &GameState, pid: Pid) -> GameState;
fn waiting_for(&self, state: &GameState) -> Option<Pid>;
fn action_generator(&self, state: &GameState, pid: Pid) -> ActionGenerator;
}
struct CardsSelectPhase;
impl PhaseTrait for CardsSelectPhase {
fn step(&self, state: &GameState) -> GameState {
let ref p1 = state.player1;
let ref p2 = state.player2;
todo!()
}
fn step_action(&self, state: &GameState, pid: Pid) -> GameState {
todo!()
}
fn waiting_for(&self, state: &GameState) -> Option<Pid> {
todo!()
}
fn action_generator(&self, state: &GameState, pid: Pid) -> ActionGenerator {
todo!()
}
}