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

@ -387,6 +387,7 @@ int type_in_quick(expansion_analyzer& ea, cell *c, const cellfunction& f) {
}
bool sizes_known() {
if(DIM == 3) return false;
if(bounded) return false;
// Castle Anthrax is infinite
if(binarytiling) return false;

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;