diff --git a/src/main.rs b/src/main.rs index 41c4740..ed5a245 100644 --- a/src/main.rs +++ b/src/main.rs @@ -148,13 +148,19 @@ fn main() { }) .build(); + let mut rng = rltk::RandomNumberGenerator::new(); + for room in map.rooms.iter().skip(1) { let (x, y) = room.center(); + let glyph = match rng.roll_dice(1,2) { + 1 => { rltk::to_cp437('g') } + _ => { rltk::to_cp437('o') } + }; gs.ecs .create_entity() .with(Position { x, y }) .with(Renderable { - glyph: rltk::to_cp437('g'), + glyph: glyph, fg: RGB::named(rltk::RED), bg: RGB::named(rltk::BLACK), })