pub fn cell_immediate_neighbor_coords(&self, coord: TileGridCoord) -> Vec<TileGridCoord> {
        let cardinal_neighbors = CartesianDirection::ALL_DIRECTIONS
            .iter()
            .copied()
            .filter_map(|dir| {
                self.cell_cardinal_neighbor_coords(coord, dir)
                    // todo: handle orange-only walls
                    .filter(|_| self.cell_wall(coord, dir) == WallState::Open)
            });
        let escalator_neighbors = self
            .escalators
            .iter()
            .filter_map(|esc_loc| esc_loc.coord_neighbor(coord));

        let mut neighbors: Vec<_> = cardinal_neighbors.chain(escalator_neighbors).collect();

        // we could have duplicates
        neighbors.sort_unstable();
        neighbors.dedup();

        neighbors
    }
/// Coordinates of "neighbors" in current tile that are "one step" away
/// (either by cardinal direction walk or escalator).
Coordinates of "neighbors" in current tile that are "one step" away
(either by cardinal direction walk or escalator).
Coordinates of " neighbors " in current tile that are " one step " away ( either by cardinal direction walk or escalator ) .
pub fn cell_immediate_neighbor_coords(&self, coord: TileGridCoord) -> Vec<TileGridCoord> {
        let cardinal_neighbors = CartesianDirection::ALL_DIRECTIONS
            .iter()
            .copied()
            .filter_map(|dir| {
                self.cell_cardinal_neighbor_coords(coord, dir)
                    // todo: handle orange-only walls
                    .filter(|_| self.cell_wall(coord, dir) == WallState::Open)
            });
        let escalator_neighbors = self
            .escalators
            .iter()
            .filter_map(|esc_loc| esc_loc.coord_neighbor(coord));
        let mut neighbors: Vec<_> = cardinal_neighbors.chain(escalator_neighbors).collect();
        // we could have duplicates
        neighbors.sort_unstable();
        neighbors.dedup();
        neighbors
    }
pub fn cell_immediate_neighbor_coords ( & self , coord : TileGridCoord ) -> Vec < TileGridCoord > { let cardinal_neighbors = CartesianDirection :: ALL_DIRECTIONS . iter ( ) . copied ( ) . filter_map ( | dir | { self . cell_cardinal_neighbor_coords ( coord , dir ) // todo: handle orange-only walls . filter ( | _ | self . cell_wall ( coord , dir ) == WallState :: Open ) } ) ; let escalator_neighbors = self . escalators . iter ( ) . filter_map ( | esc_loc | esc_loc . coord_neighbor ( coord ) ) ; let mut neighbors : Vec < _ > = cardinal_neighbors . chain ( escalator_neighbors ) . collect ( ) ; // we could have duplicates neighbors . sort_unstable ( ) ; neighbors . dedup ( ) ; neighbors }
Coordinates of "neighbors" in current tile that are "one step" away
(either by cardinal direction walk or escalator).
Coordinates of " neighbors " in current tile that are " one step " away ( either by cardinal direction walk or escalator ) .
&self
coord
TileGridCoord