here_be_dragons/examples/bsp_rooms.rs

14 lines
423 B
Rust
Raw Normal View History

2022-03-18 16:56:34 +00:00
use here_be_dragons::*;
2022-03-12 20:31:30 +00:00
use rand::prelude::*;
use std::time::{SystemTime, UNIX_EPOCH};
2020-10-17 15:31:32 +00:00
fn main() {
2022-03-12 20:31:30 +00:00
let system_time = SystemTime::now()
.duration_since(UNIX_EPOCH)
.expect("Can't access system time");
2020-10-17 15:31:32 +00:00
let mut rng = StdRng::seed_from_u64(system_time.as_millis() as u64);
let gen = BspRooms::<NoData>::new();
2020-10-17 15:31:32 +00:00
let map = gen.modify_map(&mut rng, &Map::new(80, 50));
println!("{:}", &map);
2022-03-12 20:31:30 +00:00
}