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:
parent
d021a7259c
commit
f9b03013c1
2
cell.cpp
2
cell.cpp
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user