1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-04-07 11:17:00 +00:00

rulegen:: canonical_path_to

This commit is contained in:
Zeno Rogue 2025-03-08 12:32:22 +01:00
parent 8d944f7bb7
commit 8be5986704

View File

@ -2408,6 +2408,16 @@ struct hrmap_rulegen : hrmap {
}
};
EX vector<int> canonical_path_to(heptagon *h) {
vector<int> res;
while(h != currentmap->getOrigin()) {
res.push_back(h->c.spin(0));
h = h->cmove(0);
}
reverse(res.begin(), res.end());
return res;
}
EX vector<treestate> alt_treestates;
EX void swap_treestates() {