enum Direction {
    Up,
    Down,
    Left,
    Right,
}

fn main() {
    let player_direction: Direction = Direction::Down;  

    match player_direction {
        Direction::Up => println!("We're going up!"), 
        Direction::Down => println!("We're going down!"), 
        Direction::Left => println!("We're going left!"), 
        Direction::Right => println!("We're going right!"), 
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: