mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-07-01 17:32:51 +00:00
rulegen:: analyzer improvements
This commit is contained in:
parent
9e9b331b3a
commit
2c074a7088
11
rulegen.cpp
11
rulegen.cpp
@ -421,7 +421,10 @@ void unify_distances(tcell *c1, tcell *c2) {
|
|||||||
void handle_distance_errors() {
|
void handle_distance_errors() {
|
||||||
bool b = solid_errors;
|
bool b = solid_errors;
|
||||||
solid_errors = 0;
|
solid_errors = 0;
|
||||||
if(b && !no_errors) throw hr_solid_error();
|
if(b && !no_errors) {
|
||||||
|
analyzers.clear();
|
||||||
|
throw hr_solid_error();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** make sure that we know c->dist */
|
/** make sure that we know c->dist */
|
||||||
@ -555,7 +558,7 @@ void analyzer::add_step(int pid, int s) {
|
|||||||
spin.push_back(s);
|
spin.push_back(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
map<aid_t, analyzer> analyzers;
|
EX map<aid_t, analyzer> analyzers;
|
||||||
|
|
||||||
EX aid_t get_aid(twalker cw) {
|
EX aid_t get_aid(twalker cw) {
|
||||||
ufind(cw);
|
ufind(cw);
|
||||||
@ -597,8 +600,8 @@ void extend_analyzer(twalker cw_target, int dir, int id, int mism, twalker rg) {
|
|||||||
twalker cw_conflict = cw_target + dir + wstep;
|
twalker cw_conflict = cw_target + dir + wstep;
|
||||||
auto &a_target = get_analyzer(cw_target);
|
auto &a_target = get_analyzer(cw_target);
|
||||||
auto &a_conflict = get_analyzer(cw_conflict);
|
auto &a_conflict = get_analyzer(cw_conflict);
|
||||||
twalker model = a_target.spread[0] + dir + wstep;
|
// twalker model = a_target.spread[0] + dir + wstep;
|
||||||
auto res = spread(a_conflict, model);
|
// auto res = spread(a_conflict, model);
|
||||||
vector<int> ids_to_add;
|
vector<int> ids_to_add;
|
||||||
int k = id;
|
int k = id;
|
||||||
while(k) {
|
while(k) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user