1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-19 15:20:27 +00:00

improved heptdistance a bit

This commit is contained in:
Zeno Rogue 2018-04-23 13:19:22 +02:00
parent d021a7259c
commit f9b03013c1

View File

@ -1359,7 +1359,7 @@ int heptdistance(heptagon *h1, heptagon *h2) {
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 = h1->move[0];
if(d2 >= d1) d++, h2 = h2->move[0];
if(d2 > d1) d++, h2 = h2->move[0];
}
}