1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-04 15:53:00 +00:00

approx_distance in Sol

This commit is contained in:
Zeno Rogue
2019-08-03 11:35:15 +02:00
parent 5d7ea94246
commit 875af54063
2 changed files with 11 additions and 1 deletions

View File

@@ -880,6 +880,7 @@ int heptdistance(heptagon *h1, heptagon *h2) {
#if CAP_CRYSTAL
if(geometry == gCrystal) return crystal::space_distance(h1->c7, h2->c7);
#endif
if(sol) return solv::approx_distance(h1, h2);
while(true) {
if(h1 == h2) return d;
for(int i=0; i<S7; i++) if(h1->move(i) == h2) return d + 1;