1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

updir used in heptdistance

This commit is contained in:
Zeno Rogue 2019-08-02 22:08:47 +02:00
parent 29d3410aa6
commit bca567cc10
2 changed files with 4 additions and 3 deletions

View File

@ -884,8 +884,8 @@ int heptdistance(heptagon *h1, heptagon *h2) {
if(h1 == h2) return d;
for(int i=0; i<S7; i++) if(h1->move(i) == h2) return d + 1;
int d1 = h1->distance, d2 = h2->distance;
if(d1 >= d2) d++, h1 = createStep(h1, binarytiling ? 5 : 0);
if(d2 > d1) d++, h2 = createStep(h2, binarytiling ? 5 : 0);
if(d1 >= d2) d++, h1 = createStep(h1, binary::updir());
if(d2 > d1) d++, h2 = createStep(h2, binary::updir());
}
}

View File

@ -5645,6 +5645,7 @@ namespace solv {
bool in_perspective();
extern int noclipped;
void draw_radar(bool cornermode);
void draw_radar(bool cornermode);
namespace binary { int updir(); }
}