1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-17 10:44:48 +00:00

rulegen3:: fixed suspicious path analysis

This commit is contained in:
Zeno Rogue 2022-08-19 17:40:45 +02:00
parent 59b45c1be0
commit cccab05f66

View File

@ -872,8 +872,24 @@ void throw_identity_errors(const transducer& id, const vector<int>& cyc) {
vector<int> path1;
build_vstate(vs, path1, parent_dir, parent_id, i, [&] (int i) { return q[i].ts; });
println(hlog, "suspicious path found at ", path1);
int err = vs.current_pos;
bool ok = check_det(vs);
if(ok) throw rulegen_failure("suspicious path worked");
if(ok) {
vector<int> path2;
gen_path(vs, path2);
println(hlog, "after cycle: ", path2, " (", vs.current_pos, " vs ", err, ")");
if(vs.current_pos != err) {
rpath_errors++;
error_found(vs);
return;
}
else {
if(isize(important) > impcount)
throw rulegen_retry("suspicious path worked");
else
throw rulegen_failure("suspicious path worked");
}
}
return;
}
for(auto p: sch.at->t) {