random pseudohept in Archimedean duals

This commit is contained in:
Zeno Rogue 2018-08-30 16:02:35 +02:00
parent 829850a701
commit 993ef1b164
3 changed files with 13 additions and 8 deletions

View File

@ -539,6 +539,7 @@ heptagon *build_child(heptspin p, pair<int, int> adj) {
else
h->rval1 = 3 - p.at->move(0)->rval1 - p.at->rval1;
}
h->rval0 = hrand(256);
heptspin hs(h, 0);
return h;
}
@ -848,7 +849,10 @@ bool archimedean_tiling::support_chessboard() {
return N % 2 == 0;
}
bool pseudohept(int id) {
bool pseudohept(cell *c) {
if(DUAL)
return !(c->master->rval0 & 3);
int id = id_of(c->master);
if(PURE)
return current.flags[id] & arcm::sfPH;
if(BITRUNCATED)
@ -866,12 +870,13 @@ bool linespattern(cell *c) {
return current.flags[id_of(c->master)] & arcm::sfLINE;
}
int threecolor(int id) {
int threecolor(cell *c) {
if(current.have_ph)
return !pseudohept(id);
return !arcm::pseudohept(c);
else if(PURE)
return current.tilegroup[id];
return current.tilegroup[id_of(c->master)];
else {
int id = id_of(c->master);
if(current.support_threecolor() == 2) return id < current.N * 2 ? (id&1) : 2;
return current.tilegroup[id];
}

View File

@ -503,9 +503,9 @@ void generate_floorshapes() {
if(DUAL) model.type /= 2, arcm::parent_index_of(&master) = !(i&1);
if(BITRUNCATED)
generate_floorshapes_for(i, &model, !arcm::pseudohept(i), arcm::pseudohept(i) ? 0 : 1^(i&1));
generate_floorshapes_for(i, &model, !arcm::pseudohept(&model), arcm::pseudohept(&model) ? 0 : 1^(i&1));
else if(geosupport_football() == 2)
generate_floorshapes_for(i, &model, !arcm::pseudohept(i), i >= 4 ? 1 : 0);
generate_floorshapes_for(i, &model, !arcm::pseudohept(&model), i >= 4 ? 1 : 0);
else
generate_floorshapes_for(i, &model, 0, 0);
}

View File

@ -1112,7 +1112,7 @@ int geosupport_football() {
int pattern_threecolor(cell *c) {
if(archimedean) {
if(PURE)
return arcm::threecolor(arcm::id_of(c->master));
return arcm::threecolor(c);
else /* if(BITRUNCATED) */
return c->master->rval1;
}
@ -1217,7 +1217,7 @@ int pattern_threecolor(cell *c) {
bool pseudohept(cell *c) {
if(IRREGULAR) return irr::pseudohept(c);
if(binarytiling) return c->type & c->master->distance & 1;
if(archimedean) return arcm::pseudohept(arcm::id_of(c->master));
if(archimedean) return arcm::pseudohept(c);
if(GOLDBERG && gp_threecolor() == 2)
return gp::pseudohept_val(c) == 0;
if(GOLDBERG && gp_threecolor() == 1 && (S7&1) && (S3 == 3))