fn random() -> Self {
        // Randomly generate a number between 0 and 3 (inclusive)
        // and return the corresponding Direction
        rand::thread_rng().gen_range(0..=3).into()
    }
/// A constructor function that generates a new Direction4 with a random direction
A constructor function that generates a new Direction4 with a random direction
A constructor function that generates a new Direction4 with a random direction
fn random() -> Self {
        // Randomly generate a number between 0 and 3 (inclusive)
        // and return the corresponding Direction
        rand::thread_rng().gen_range(0..=3).into()
    }
fn random ( ) -> Self { // Randomly generate a number between 0 and 3 (inclusive) // and return the corresponding Direction rand :: thread_rng ( ) . gen_range ( 0 ..= 3 ) . into ( ) }
A constructor function that generates a new Direction4 with a random direction
A constructor function that generates a new Direction4 with a random direction