1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-24 05:17:17 +00:00

fixed eudist in bitruncated square grid

This commit is contained in:
Zeno Rogue 2018-09-12 04:15:35 +02:00
parent 3bf2ed1d2d
commit b5c0675daa

View File

@ -1014,6 +1014,8 @@ void verifycells(heptagon *at) {
int eudist(int sx, int sy) {
int z0 = abs(sx);
int z1 = abs(sy);
if(a4 && BITRUNCATED)
return (z0 == z1 && z0 > 0) ? z0+1: max(z0, z1);
if(a4) return z0 + z1;
int z2 = abs(sx+sy);
return max(max(z0,z1), z2);