diff --git a/benches/e2e.rs b/benches/e2e.rs index f3c0499..b8f27a8 100644 --- a/benches/e2e.rs +++ b/benches/e2e.rs @@ -61,11 +61,7 @@ struct Move { index: usize, } -impl Action for Move { - fn id(&self) -> usize { - self.index - } -} +impl Action for Move {} /// Tic-Tac-Toe game state #[derive(Debug, Clone)] diff --git a/examples/auto_tic_tac_toe.rs b/examples/auto_tic_tac_toe.rs index b6a5387..1183ea5 100644 --- a/examples/auto_tic_tac_toe.rs +++ b/examples/auto_tic_tac_toe.rs @@ -84,11 +84,7 @@ struct Move { index: usize, } -impl Action for Move { - fn id(&self) -> usize { - self.index - } -} +impl Action for Move {} /// Tic-Tac-Toe game state #[derive(Clone)] diff --git a/examples/tic_tac_toe.rs b/examples/tic_tac_toe.rs index 263b5c7..c0bc3ec 100644 --- a/examples/tic_tac_toe.rs +++ b/examples/tic_tac_toe.rs @@ -119,11 +119,7 @@ struct Move { index: usize, } -impl Action for Move { - fn id(&self) -> usize { - self.index - } -} +impl Action for Move {} /// Tic-Tac-Toe game state #[derive(Clone)] diff --git a/src/state.rs b/src/state.rs index 747063c..2048962 100644 --- a/src/state.rs +++ b/src/state.rs @@ -72,10 +72,7 @@ pub trait GameState: Clone + Debug { /// /// An action is dependent upon the specific game being defined, and includes /// things like moves, attacks, and other decisions. -pub trait Action: Clone + Debug { - /// Returns a uniqie identifier for this action - fn id(&self) -> usize; -} +pub trait Action: Clone + Debug {} /// Trait used for players participating in a game pub trait Player: Clone + Debug + PartialEq + Eq + Hash {}