// This tile flipped along it's up-down axis. Left becomes right.
This tile flipped along it's up-down axis. Left becomes right.
This tile flipped along it ' s up - down axis . Left becomes right .
fn flipped(&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 => 10 - e + 1,
                91..=100 => 100 - (e - 90) + 1,
                x if x % 10 == 0 => x - 9,
                x if (x + 9) % 10 == 0 => x + 9,
                _ => panic!("not an edge: {}", e),
            };
            edges.insert(next);
        }
        Tile {
            num: self.num,
            edges,
        }
    }
fn flipped ( & 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 => 10 - e + 1 , 91 ..= 100 => 100 - ( e - 90 ) + 1 , x if x % 10 == 0 => x - 9 , x if ( x + 9 ) % 10 == 0 => x + 9 , _ => panic ! ( " " e ) , } ; edges . insert ( next ) ; } Tile { num : self . num , edges , } }
This tile flipped along it's up-down axis.
This tile flipped along it ' s up - down axis .
&self
<not_specific>