Fix bugs.

This commit is contained in:
hal8174 2024-02-27 22:02:40 +01:00
parent 0b84841768
commit 55ef06f868
3 changed files with 41 additions and 4 deletions

View file

@ -88,10 +88,10 @@ impl ConflictAvoidance {
dir: problem.end[i].1,
});
p.push(PathField::Belt {
pos: problem.end[i].0,
dir: problem.end[i].1,
});
// p.push(PathField::Belt {
// pos: problem.end[i].0,
// dir: problem.end[i].1,
// });
belts.push(p);
}
@ -370,6 +370,10 @@ impl ConflictAvoidance {
),
);
candidate.extend_range(&conflicts);
if candidate != c && !candidates.iter().any(|c| c == &candidate) {
candidates.push(candidate);
}
// dbg!(&candidates);
}
}