fn turn_right(&self) -> Self {
        // Check the current Direction and return the corresponding rotated Direction
        match self {
            Direction4::North => Direction4::East,
            Direction4::East => Direction4::South,
            Direction4::South => Direction4::West,
            Direction4::West => Direction4::North,
        }
    }
/// A method that rotates the Direction 90 degrees clockwise and returns a new Direction.
A method that rotates the Direction 90 degrees clockwise and returns a new Direction.
A method that rotates the Direction 90 degrees clockwise and returns a new Direction .
fn turn_right(&self) -> Self {
        // Check the current Direction and return the corresponding rotated Direction
        match self {
            Direction4::North => Direction4::East,
            Direction4::East => Direction4::South,
            Direction4::South => Direction4::West,
            Direction4::West => Direction4::North,
        }
    }
fn turn_right ( & self ) -> Self { // Check the current Direction and return the corresponding rotated Direction match self { Direction4 :: North => Direction4 :: East , Direction4 :: East => Direction4 :: South , Direction4 :: South => Direction4 :: West , Direction4 :: West => Direction4 :: North , } }
A method that rotates the Direction 90 degrees clockwise and returns a new Direction.
A method that rotates the Direction 90 degrees clockwise and returns a new Direction .
&self
&self