robot_simulator
Types
pub type Direction {
North
East
South
West
}
Constructors
-
North
-
East
-
South
-
West
pub type Position {
Position(x: Int, y: Int)
}
Constructors
-
Position(x: Int, y: Int)
pub type Robot {
Robot(direction: Direction, position: Position)
}
Constructors
-
Robot(direction: Direction, position: Position)
Functions
pub fn create(direction: Direction, position: Position) -> Robot
pub fn move(
direction: Direction,
position: Position,
instructions: String,
) -> Robot