Simple Path

This commit is contained in:
hal8174 2023-12-07 14:01:31 +01:00
parent 7d47a10acf
commit 6f6a7f978b
6 changed files with 333 additions and 161 deletions

View file

@ -95,16 +95,14 @@ where
map.insert(node, MapObject::new(o.node.clone(), o.score + wheight, h));
}
}
dbg!(&q);
// dbg!(&q);
}
if map.get(&end).is_none() {
return None;
}
map.get(&end)?;
let mut result = vec![end];
dbg!(&map);
// dbg!(&map);
loop {
let parent = map.get(result.last().expect("last")).expect("get");