Multi Path
This commit is contained in:
parent
6f6a7f978b
commit
c10843ad2f
3 changed files with 142 additions and 34 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use factorio_blueprint::belt_finding::{Position, Problem};
|
||||
|
||||
fn main() {
|
||||
let mut p = Problem::new(17, 13, Position::new(3, 8), Position::new(13, 5));
|
||||
let mut p = Problem::new(17, 13);
|
||||
|
||||
p.set_blocked(0, 3, true);
|
||||
|
||||
|
|
@ -31,9 +31,27 @@ fn main() {
|
|||
|
||||
p.set_blocked(16, 9, true);
|
||||
|
||||
p.add_connection(Position::new(3, 7), Position::new(13, 4));
|
||||
p.add_connection(Position::new(3, 8), Position::new(13, 5));
|
||||
|
||||
p.add_connection(Position::new(3, 4), Position::new(13, 8));
|
||||
p.add_connection(Position::new(3, 5), Position::new(13, 7));
|
||||
|
||||
// p.set_blocked(8, 12, true);
|
||||
// p.set_blocked(8, 11, true);
|
||||
// p.set_blocked(8, 10, true);
|
||||
// p.set_blocked(8, 9, true);
|
||||
// p.set_blocked(8, 8, true);
|
||||
// p.set_blocked(8, 7, true);
|
||||
// p.set_blocked(8, 6, true);
|
||||
// p.set_blocked(8, 5, true);
|
||||
// p.set_blocked(8, 4, true);
|
||||
// p.set_blocked(8, 3, true);
|
||||
// p.set_blocked(8, 2, true);
|
||||
// p.set_blocked(8, 1, true);
|
||||
// p.set_blocked(8, 0, true);
|
||||
|
||||
println!("{}", p);
|
||||
|
||||
p.find_path();
|
||||
|
||||
println!("{}", p);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue