test: pin ordering decisions the suite did not catch (Modules 5, 8, 9); stepped objects do not block a stack
Mutation runs on the references showed six surviving mutants: a live aura scan, two turn-phase reorderings, a dropped final parse, and two hazard reorderings. Each now fails a named test. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
d5d742450c
commit
e907f17937
15 files changed
+563
-24
No files matched your search
@@ -61,7 +61,7 @@ pub struct Plan {
|
||||
|
||||
/// Plans one move on a board it only reads. `stepped` holds the objects that have
|
||||
/// already stepped in this movement phase, in an earlier committed plan: an object
|
||||
/// steps at most once per phase, so none of them can step again.
|
||||
/// steps at most once per phase, so none of them steps again.
|
||||
pub struct Planner<'a> {
|
||||
level: &'a Level,
|
||||
dir: Dir,
|
||||
@@ -105,14 +105,15 @@ impl<'a> Planner<'a> {
|
||||
/// the responses add. Returns whether it can. If it can't, the plan is left as
|
||||
/// it was before the call. An object already planned to move, or to be
|
||||
/// destroyed, is out of the way: the answer is yes, and nothing is added. An
|
||||
/// object that has already stepped in this movement phase can't step again: the
|
||||
/// answer is no.
|
||||
/// object that has already stepped in this movement phase doesn't step again, and
|
||||
/// doesn't hold the mover back either: the answer is yes, and nothing is added, so
|
||||
/// objects that began the phase stacked on one tile end it stacked.
|
||||
pub fn try_move(&mut self, id: ObjectId) -> bool {
|
||||
if self.plan.moving.contains(&id) || self.plan.destroyed.contains(&id) {
|
||||
return true;
|
||||
}
|
||||
if self.stepped.contains(&id) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
let level = self.level;
|
||||
let o = level.board().get(id);
|
||||
|
||||
Reference in new issue
Block a user