pub fn remove_unseen_walls (width : usize, height: usize, tiles : &mut Vec<TileType>, wall : TileType, floor : TileType) {
	debug!("Removing unseen walls");

	let mut flagged_points : Vec<(usize, usize)> = Vec::new();

	for x in 0..width {
		for y in 0..height {
			if tiles[x+y*width] == wall {
				if get_surrounding_neighbor_count(width, height, tiles, floor, x as i32, y as i32) == 0 {
					flagged_points.push((x,y));
				}
			}
		}
	}

	for point in flagged_points {
		tiles[point.0+point.1*width] = TileType::Empty;
	}
}
/// Removes wall tiles that cannot be seen by the player.
Removes wall tiles that cannot be seen by the player.
Removes wall tiles that cannot be seen by the player .
pub fn remove_unseen_walls (width : usize, height: usize, tiles : &mut Vec<TileType>, wall : TileType, floor : TileType) {
	debug!("Removing unseen walls");
	let mut flagged_points : Vec<(usize, usize)> = Vec::new();
	for x in 0..width {
		for y in 0..height {
			if tiles[x+y*width] == wall {
				if get_surrounding_neighbor_count(width, height, tiles, floor, x as i32, y as i32) == 0 {
					flagged_points.push((x,y));
				}
			}
		}
	}
	for point in flagged_points {
		tiles[point.0+point.1*width] = TileType::Empty;
	}
}
pub fn remove_unseen_walls ( width : usize , height : usize , tiles : & mut Vec < TileType > , wall : TileType , floor : TileType ) { debug ! ( " " ) ; let mut flagged_points : Vec < ( usize , usize ) > = Vec :: new ( ) ; for x in 0 .. width { for y in 0 .. height { if tiles [ x + y * width ] == wall { if get_surrounding_neighbor_count ( width , height , tiles , floor , x as i32 , y as i32 ) == 0 { flagged_points . push ( ( x , y ) ) ; } } } } for point in flagged_points { tiles [ point . 0 + point . 1 * width ] = TileType :: Empty ; } }
Removes wall tiles that cannot be seen by the player.
Removes wall tiles that cannot be seen by the player .
width
usize
height
usize
tiles
&mut Vec<TileType>
wall
TileType
floor
TileType
width
usize
height
usize
tiles
&mut Vec<TileType>
wall
TileType
floor
TileType