mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-20 11:54:48 +00:00
improved updir and updir_alt
This commit is contained in:
parent
c53270ca16
commit
c579db717f
7
cell.cpp
7
cell.cpp
@ -609,7 +609,7 @@ EX int updir(heptagon *h) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
if(h->distance == 0) return -1;
|
||||
if(h->s == hsOrigin) return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -623,10 +623,7 @@ EX int updir_alt(heptagon *h) {
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
for(int i=0; i<S7; i++)
|
||||
if(h->move(i) && h->move(i)->alt == h->alt->move(0))
|
||||
return i;
|
||||
return -1;
|
||||
return gmod(updir(h->alt) + altmap::relspin(h->alt), h->type);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user