1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-16 22:57:38 +00:00

celldist now works in the binary tiling as for other geometries (distance from origin, not horocycle index); also types are computed nicely for the origin-based celldist

This commit is contained in:
Zeno Rogue
2018-09-28 16:27:03 +02:00
parent ce390de0d2
commit d0ee141270
5 changed files with 26 additions and 21 deletions

View File

@@ -218,7 +218,7 @@ namespace yendor {
// make it challenging
vector<int> ds;
for(int d=0; d<ycw.at->type; d++) {
if(celldist((ycw+d).cpeek()) < celldist(ycw.at))
if(celldistAlt((ycw+d).cpeek()) < celldistAlt(ycw.at))
ds.push_back(d);
}
if(isize(ds)) ycw += ds[hrand(isize(ds))];