sorry - swapping from rustfmt to prettier-rust
This commit is contained in:
parent
281396f9ce
commit
c2c7e0bd52
93 changed files with 2797 additions and 2021 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use super::{BuilderMap, MetaMapBuilder, Rect, TileType};
|
||||
use super::{ BuilderMap, MetaMapBuilder, Rect, TileType };
|
||||
use rltk::RandomNumberGenerator;
|
||||
|
||||
pub struct RoomCornerRounder {}
|
||||
|
|
@ -23,13 +23,13 @@ impl RoomCornerRounder {
|
|||
if x > 0 && build_data.map.tiles[idx - 1] == TileType::Wall {
|
||||
neighbour_walls += 1;
|
||||
}
|
||||
if y > 0 && build_data.map.tiles[idx - w as usize] == TileType::Wall {
|
||||
if y > 0 && build_data.map.tiles[idx - (w as usize)] == TileType::Wall {
|
||||
neighbour_walls += 1;
|
||||
}
|
||||
if x < w - 2 && build_data.map.tiles[idx + 1] == TileType::Wall {
|
||||
neighbour_walls += 1;
|
||||
}
|
||||
if y < h - 2 && build_data.map.tiles[idx + w as usize] == TileType::Wall {
|
||||
if y < h - 2 && build_data.map.tiles[idx + (w as usize)] == TileType::Wall {
|
||||
neighbour_walls += 1;
|
||||
}
|
||||
if neighbour_walls == 2 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue