Add staging api #18

Open
Quaternions wants to merge 7 commits from validate into master
Showing only changes of commit 4cd41fbdee - Show all commits
+1 -1
View File
@@ -11,11 +11,11 @@ pub trait Game: Clone {
type Config: Clone + core::fmt::Debug; type Config: Clone + core::fmt::Debug;
type Instruction: Clone + core::fmt::Debug; type Instruction: Clone + core::fmt::Debug;
fn score(&self, stats: &Self::Stats, config: &Self::Config) -> Self::Score; fn score(&self, stats: &Self::Stats, config: &Self::Config) -> Self::Score;
fn is_instruction_valid(&self, config: &Self::Config, instruction: &Self::Instruction) -> bool;
fn possible_instructions( fn possible_instructions(
&self, &self,
config: &Self::Config, config: &Self::Config,
) -> impl Iterator<Item = Self::Instruction> + use<Self>; ) -> impl Iterator<Item = Self::Instruction> + use<Self>;
fn is_instruction_valid(&self, config: &Self::Config, instruction: &Self::Instruction) -> bool;
fn is_win(&self) -> bool; fn is_win(&self) -> bool;
fn stage_instruction<'a>( fn stage_instruction<'a>(
&'a mut self, &'a mut self,