1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-21 13:28:05 +00:00

3D:: yendor works (?)

This commit is contained in:
?
2019-02-26 12:29:58 +01:00
committed by Zeno Rogue
parent 85cb1bbb11
commit 7fadb7f98f
2 changed files with 15 additions and 0 deletions

View File

@@ -266,6 +266,20 @@ namespace yendor {
}
}
else if(DIM == 3) {
int d = celldistance(nyi.path[0], ycw.at);
vector<cell*> next;
forCellCM(c, ycw.at) if(celldistance(nyi.path[0], c) > d) next.push_back(c);
if(!isize(next)) {
printf("error: no more cells");
ycw.at = ycw.at->move(hrand(ycw.at->type));
}
else {
ycw.at = next[hrand(isize(next))];
}
nyi.path[i+1] = ycw.at;
}
else {
// stupid
ycw += rev;