mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-04-01 00:07:02 +00:00
fixed loop detection in hrmap_h3_subrule
This commit is contained in:
parent
647a70e27f
commit
498c9828c3
5
reg3.cpp
5
reg3.cpp
@ -2278,7 +2278,8 @@ EX namespace reg3 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
heptagon *create_step(heptagon *parent, int d) override {
|
heptagon *create_step(heptagon *parent, int d) override {
|
||||||
if(starts[isize(starts)/2] == parent) {
|
heptspin parentd(parent, d);
|
||||||
|
if(starts[isize(starts)/2] == parentd) {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
vector<heptspin> cut;
|
vector<heptspin> cut;
|
||||||
for(auto s: starts) if(i++ >= isize(starts)/2) cut.push_back(s);
|
for(auto s: starts) if(i++ >= isize(starts)/2) cut.push_back(s);
|
||||||
@ -2286,7 +2287,7 @@ EX namespace reg3 {
|
|||||||
explain_conflict(cut);
|
explain_conflict(cut);
|
||||||
throw hr_exception("create_step cycle detected");
|
throw hr_exception("create_step cycle detected");
|
||||||
}
|
}
|
||||||
starts.push_back(parent);
|
starts.push_back(parentd);
|
||||||
finalizer f([] { starts.pop_back(); });
|
finalizer f([] { starts.pop_back(); });
|
||||||
|
|
||||||
int id = parent->fiftyval;
|
int id = parent->fiftyval;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user