Fix bugs.

This commit is contained in:
hal8174 2024-02-27 22:43:52 +01:00
parent 55ef06f868
commit 73c525985c

View file

@ -119,7 +119,7 @@ impl ConflictAvoidance {
}
for path in &self.belts {
for p in &path[1..path.len() - 1] {
for p in &path[1..] {
match p {
PathField::Belt { pos, dir: _ } => {
*conflicts.get_mut(pos.x as usize, pos.y as usize) += 1
@ -440,7 +440,7 @@ impl ConflictAvoidance {
}
for path in &self.belts {
for p in &path[1..path.len() - 1] {
for p in &path[1..] {
match p {
PathField::Belt { pos, dir: _ } => {
*conflicts.get_mut(pos.x as usize, pos.y as usize) += 1