fn rotated(&self) -> Tile {
        let mut edges = HashSet::new();
        for e in self.edges.iter() {
            // feels awkward, maybe a better way?
            let next = match e {
                0..=10 => e * 10,
                91..=100 => (e - 91) * 10 + 1,
                x if x % 10 == 0 => 100 - ((x - 10) / 10),
                x if (x + 9) % 10 == 0 => 10 - ((x - 1) / 10),
                _ => panic!("not an edge: {}", e),
            };
            edges.insert(next);
        }
        Tile {
            num: self.num,
            edges,
        }
    }
// This tile rotated 90 degrees clockwise
This tile rotated 90 degrees clockwise
This tile rotated 90 degrees clockwise
fn rotated(&self) -> Tile {
        let mut edges = HashSet::new();
        for e in self.edges.iter() {
            // feels awkward, maybe a better way?
            let next = match e {
                0..=10 => e * 10,
                91..=100 => (e - 91) * 10 + 1,
                x if x % 10 == 0 => 100 - ((x - 10) / 10),
                x if (x + 9) % 10 == 0 => 10 - ((x - 1) / 10),
                _ => panic!("not an edge: {}", e),
            };
            edges.insert(next);
        }
        Tile {
            num: self.num,
            edges,
        }
    }
fn rotated ( & self ) -> Tile { let mut edges = HashSet :: new ( ) ; for e in self . edges . iter ( ) { // feels awkward, maybe a better way? let next = match e { 0 ..= 10 => e * 10 , 91 ..= 100 => ( e - 91 ) * 10 + 1 , x if x % 10 == 0 => 100 - ( ( x - 10 ) / 10 ) , x if ( x + 9 ) % 10 == 0 => 10 - ( ( x - 1 ) / 10 ) , _ => panic ! ( " " e ) , } ; edges . insert ( next ) ; } Tile { num : self . num , edges , } }
This tile rotated 90 degrees clockwise
This tile rotated 90 degrees clockwise
&self