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:
@@ -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))];
|
||||
|
Reference in New Issue
Block a user