pub trait IMoveCommand {
    // Required methods
    fn get_command(&self) -> &str;
    fn get_name(&self) -> &str;
    fn execute(&self);

    // Provided method
    fn show(&self) { ... }
}

Required Methods§

source

fn get_command(&self) -> &str

Retrieve the command character representing the move command.

source

fn get_name(&self) -> &str

Retrieve the name of the move command.

source

fn execute(&self)

“Execute” the move command.

Provided Methods§

source

fn show(&self)

Display the move command and its name on a single line.

Implementors§