mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-25 09:30:35 +00:00
refactored clean_data and clean_parents
This commit is contained in:
parent
881b262174
commit
2f11f9babb
15
rulegen.cpp
15
rulegen.cpp
@ -1312,12 +1312,23 @@ void find_single_live_branch(twalker at) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EX void clean_data() {
|
||||||
|
analyzers.clear();
|
||||||
|
important = t_origin;
|
||||||
|
}
|
||||||
|
|
||||||
|
EX void clean_parents() {
|
||||||
|
clean_data();
|
||||||
|
sidecache.clear();
|
||||||
|
auto c = first_tcell;
|
||||||
|
while(c) { c->parent_dir = MYSTERY; c = c->next; }
|
||||||
|
}
|
||||||
|
|
||||||
EX void rules_iteration() {
|
EX void rules_iteration() {
|
||||||
try_count++;
|
try_count++;
|
||||||
|
|
||||||
if((try_count & (try_count-1)) == 0) {
|
if((try_count & (try_count-1)) == 0) {
|
||||||
analyzers.clear();
|
clean_data();
|
||||||
important = t_origin;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(debugflags & DF_GEOM) println(hlog, "attempt: ", try_count);
|
if(debugflags & DF_GEOM) println(hlog, "attempt: ", try_count);
|
||||||
|
Loading…
Reference in New Issue
Block a user