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:
9
game.cpp
9
game.cpp
@@ -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:
|
||||
|
Reference in New Issue
Block a user