1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-20 16:37:40 +00:00

reverse_directions for heptagons

This commit is contained in:
Zeno Rogue
2019-09-26 13:13:44 +02:00
parent dca95aa2aa
commit fd67768234
2 changed files with 9 additions and 3 deletions

View File

@@ -4278,6 +4278,15 @@ EX int pickDownDirection(cell *c, flagtype mf) {
}
EX vector<int> reverse_directions(cell *c, int dir) {
if(PURE) return reverse_directions(c->master, dir);
int d = c->degree();
if(d & 1)
return { gmod(dir + c->type/2, c->type), gmod(dir + (c->type+1)/2, c->type) };
else
return { gmod(dir + c->type/2, c->type) };
}
EX vector<int> reverse_directions(heptagon *c, int dir) {
int d = c->degree();
switch(geometry) {
case gBinary3: