Browse Source

Allow gradual priorities for horizontal or vertical structures.

master
Juergen Stuber 2 years ago
parent
commit
9877915249
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/bin/dualmaze/main.rs

+ 2
- 2
src/bin/dualmaze/main.rs View File

@ -103,7 +103,7 @@ impl Board {
// not a potential wall, unused
actual = Orientation::Horizontal;
}
let prio = if actual == desired { -1 } else { 1 };
let prio = if actual == desired { -5 } else { 5 };
self.set(pos, Square::Unknown { prio });
}
_ => (),
@ -179,7 +179,7 @@ where
open.push(Move {
from,
dir,
prio: prio * 1000 + rng.gen_range(0, 1000),
prio: prio * 100 + rng.gen_range(0, 1000),
});
}
}


Loading…
Cancel
Save