1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[derive(Clone, Debug, PartialEq)]
pub enum Direction {
    Top,
    Right,
    Bottom,
    Left,
}

impl std::fmt::Display for Direction {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Direction::Top => write!(f, "top"),
            Direction::Right => write!(f, "right"),
            Direction::Bottom => write!(f, "bottom"),
            Direction::Left => write!(f, "left"),
        }
    }
}