mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-20 23:50:27 +00:00
fixed push_deadstack in the root
This commit is contained in:
parent
4c3800f2b4
commit
c97290890e
@ -1122,8 +1122,11 @@ void push_deadstack(vector<tsinfo>& hash, twalker w, tsinfo tsi, int dir) {
|
|||||||
hash.push_back(tsi);
|
hash.push_back(tsi);
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
|
ufind(w);
|
||||||
|
if(isize(hash) > 10000) throw rulegen_failure("deadstack overflow");
|
||||||
tsi.second += dir; w += dir;
|
tsi.second += dir; w += dir;
|
||||||
auto& ts = treestates[tsi.first];
|
auto& ts = treestates[tsi.first];
|
||||||
|
if(ts.is_root) return;
|
||||||
if(tsi.second == 0 || tsi.second == isize(ts.rules)) {
|
if(tsi.second == 0 || tsi.second == isize(ts.rules)) {
|
||||||
w += wstep;
|
w += wstep;
|
||||||
tsi = get_tsinfo(w);
|
tsi = get_tsinfo(w);
|
||||||
|
Loading…
Reference in New Issue
Block a user