Allow gradual priorities for horizontal or vertical structures.

This commit is contained in:
Juergen Stuber 2018-12-02 10:26:24 +01:00
parent b73101be65
commit 9877915249

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),
});
}
}