Initial commit
This commit is contained in:
commit
7d47a10acf
18 changed files with 1545 additions and 0 deletions
14
examples/path.rs
Normal file
14
examples/path.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
use factorio_blueprint::{
|
||||
belt_finding::{find_path, Field, Position, QueueObject},
|
||||
misc::Map,
|
||||
priority_queue::BinaryHeap,
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let mut map: Map<Field> = Map::new(5, 5);
|
||||
map.get_mut(2, 0).blocked = true;
|
||||
map.get_mut(2, 1).blocked = true;
|
||||
map.get_mut(2, 2).blocked = true;
|
||||
|
||||
find_path::<BinaryHeap<QueueObject>>(map, Position { x: 0, y: 0 }, Position { x: 4, y: 0 });
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue