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:
parent
8d944f7bb7
commit
8be5986704
10
rulegen.cpp
10
rulegen.cpp
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user