pub fn dig_circle (width : usize, height : usize, tile : (i32, i32), radius: i32, tiles: &mut Vec<TileType>, floor : TileType) {
	for x in -radius..radius {
		for y in -radius..radius {
			if x*x + y*y <= radius*radius {
				let dig_x = tile.0 + x;
				let dig_y = tile.1 + y;
				if (dig_x >= 0 && dig_x < width as i32) && (dig_y >= 0 && dig_y < height as i32) {
					let idx = dig_x as usize + dig_y as usize * width;
					
					tiles[idx] = floor;
				} 
			}
		}
	}
}
/// Digs a circle of a given radius of floors at a point 
Digs a circle of a given radius of floors at a point
Digs a circle of a given radius of floors at a point
pub fn dig_circle (width : usize, height : usize, tile : (i32, i32), radius: i32, tiles: &mut Vec<TileType>, floor : TileType) {
	for x in -radius..radius {
		for y in -radius..radius {
			if x*x + y*y <= radius*radius {
				let dig_x = tile.0 + x;
				let dig_y = tile.1 + y;
				if (dig_x >= 0 && dig_x < width as i32) && (dig_y >= 0 && dig_y < height as i32) {
					let idx = dig_x as usize + dig_y as usize * width;
					tiles[idx] = floor;
				} 
			}
		}
	}
}
pub fn dig_circle ( width : usize , height : usize , tile : ( i32 , i32 ) , radius : i32 , tiles : & mut Vec < TileType > , floor : TileType ) { for x in - radius .. radius { for y in - radius .. radius { if x * x + y * y <= radius * radius { let dig_x = tile . 0 + x ; let dig_y = tile . 1 + y ; if ( dig_x >= 0 && dig_x < width as i32 ) && ( dig_y >= 0 && dig_y < height as i32 ) { let idx = dig_x as usize + dig_y as usize * width ; tiles [ idx ] = floor ; } } } } }
Digs a circle of a given radius of floors at a point
Digs a circle of a given radius of floors at a point
width
usize
height
usize
tile
(i32, i32)
radius
i32
tiles
&mut Vec<TileType>
floor
TileType
width
usize
height
usize
tile
(i32, i32)
radius
i32
tiles
&mut Vec<TileType>
floor
TileType