Add display separator
This commit is contained in:
parent
9adcfe9ce3
commit
36c8be2dd2
@ -246,6 +246,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
let world: world::World = parse_config(raw_conf, &mut robot_pool)?;
|
let world: world::World = parse_config(raw_conf, &mut robot_pool)?;
|
||||||
let mut hash: HashMap<robot::Position, u32> = HashMap::new();
|
let mut hash: HashMap<robot::Position, u32> = HashMap::new();
|
||||||
create_hash_map(&robot_pool, &mut hash);
|
create_hash_map(&robot_pool, &mut hash);
|
||||||
|
println!("Initial state");
|
||||||
|
println!("==============");
|
||||||
display_grid(&world, &robot_pool, &hash);
|
display_grid(&world, &robot_pool, &hash);
|
||||||
loop {
|
loop {
|
||||||
let mut piouff: u32 = 0;
|
let mut piouff: u32 = 0;
|
||||||
@ -264,6 +266,9 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
println!("Final state");
|
||||||
|
println!("============");
|
||||||
|
display_grid(&world, &robot_pool, &hash);
|
||||||
for r in &robot_pool {
|
for r in &robot_pool {
|
||||||
println!("Robot id: {}: Final position: ({}, {})", r.id, r.p.x, r.p.y);
|
println!("Robot id: {}: Final position: ({}, {})", r.id, r.p.x, r.p.y);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user