pub trait CommandTrait {
// Required methods
fn execute(&self, state: &mut GameState) -> Result<()>;
fn get_type(&self) -> CommandType;
}Expand description
A trait that defines the basic behavior for all commands in the game.
Required Methods§
Sourcefn get_type(&self) -> CommandType
fn get_type(&self) -> CommandType
Gets the type of the command.