Fix bugs.
This commit is contained in:
parent
55ef06f868
commit
73c525985c
1 changed files with 2 additions and 2 deletions
|
|
@ -119,7 +119,7 @@ impl ConflictAvoidance {
|
||||||
}
|
}
|
||||||
|
|
||||||
for path in &self.belts {
|
for path in &self.belts {
|
||||||
for p in &path[1..path.len() - 1] {
|
for p in &path[1..] {
|
||||||
match p {
|
match p {
|
||||||
PathField::Belt { pos, dir: _ } => {
|
PathField::Belt { pos, dir: _ } => {
|
||||||
*conflicts.get_mut(pos.x as usize, pos.y as usize) += 1
|
*conflicts.get_mut(pos.x as usize, pos.y as usize) += 1
|
||||||
|
|
@ -440,7 +440,7 @@ impl ConflictAvoidance {
|
||||||
}
|
}
|
||||||
|
|
||||||
for path in &self.belts {
|
for path in &self.belts {
|
||||||
for p in &path[1..path.len() - 1] {
|
for p in &path[1..] {
|
||||||
match p {
|
match p {
|
||||||
PathField::Belt { pos, dir: _ } => {
|
PathField::Belt { pos, dir: _ } => {
|
||||||
*conflicts.get_mut(pos.x as usize, pos.y as usize) += 1
|
*conflicts.get_mut(pos.x as usize, pos.y as usize) += 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue