mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-20 03:54:47 +00:00
rulegen:: handle dead roots
This commit is contained in:
parent
308ed5cbb1
commit
711ae44605
@ -1536,6 +1536,15 @@ EX void rules_iteration() {
|
||||
|
||||
branch_conflicts_seen.clear();
|
||||
|
||||
// handle dead roots -- some of their branches MUST live
|
||||
for(int id=0; id<isize(treestates); id++) if(treestates[id].is_root && !treestates[id].is_live) {
|
||||
auto r = treestates[id].rules;
|
||||
for(int i=0; i<isize(r); i++) if(r[i] >= 0) {
|
||||
examine_branch(id, i, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for(int id=0; id<isize(treestates); id++) if(treestates[id].is_live) {
|
||||
auto r = treestates[id].rules; /* no & because treestates might have moved */
|
||||
if(r.empty()) continue;
|
||||
|
Loading…
Reference in New Issue
Block a user