pub struct MoveLeft {
command: String,
name: String,
}
Expand description
Represents the Move Left command.
Fields§
§command: String
The command character representing this move command.
name: String
The name of this move command.
Implementations§
source§impl MoveLeft
impl MoveLeft
sourcepub fn new(command: &str) -> Box<dyn IMoveCommand>
pub fn new(command: &str) -> Box<dyn IMoveCommand>
Constructor.
Parameters
-
command
The command character representing this move command.
Returns
Returns a new instance of the MoveLeft command represented by the IMoveCommand trait.
Trait Implementations§
source§impl IMoveCommand for MoveLeft
impl IMoveCommand for MoveLeft
source§fn get_command(&self) -> &str
fn get_command(&self) -> &str
Retrieve the command character representing the move command.