(&self)
| 145 | } |
| 146 | |
| 147 | pub fn tile_positions(&self) -> impl Iterator<Item = (usize, usize, &MapTile)> { |
| 148 | self.tiles |
| 149 | .iter() |
| 150 | .enumerate() |
| 151 | .map(move |(i, tile)| (i % self.width, i / self.width, tile)) |
| 152 | } |
| 153 | |
| 154 | pub fn carve_room(&mut self, room: &Room) { |
| 155 | for x in room.x + 1..room.x + room.width { |