whirl:: threecolor pattern
This commit is contained in:
parent
b2b7190fbc
commit
7ca5a8713a
15
pattern2.cpp
15
pattern2.cpp
|
@ -34,6 +34,13 @@ bool ishex1(cell *c) {
|
||||||
else return c->type != S6;
|
else return c->type != S6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ishex2(cell *c) {
|
||||||
|
// EUCLIDEAN
|
||||||
|
if(euclid) return eupattern(c) == 1;
|
||||||
|
else if(whirl::whirl) return c->master->c7 != c && whirl::pseudohept_val(c) == 1;
|
||||||
|
else return c->type != S6;
|
||||||
|
}
|
||||||
|
|
||||||
int emeraldval(cell *c) {
|
int emeraldval(cell *c) {
|
||||||
if(euclid) return eupattern(c);
|
if(euclid) return eupattern(c);
|
||||||
if(sphere) return 0;
|
if(sphere) return 0;
|
||||||
|
@ -557,7 +564,12 @@ namespace patterns {
|
||||||
si.id += 16, si.symmetries = 4;
|
si.id += 16, si.symmetries = 4;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
si.id = 8 * ((c->master->fiftyval & 1) ^ (c->spin(0) & 1));
|
int sp = c->spin(0);
|
||||||
|
if(whirl::whirl) {
|
||||||
|
sp = whirl::last_dir(c);
|
||||||
|
sp ^= ishex2(c);
|
||||||
|
}
|
||||||
|
si.id = 8 * ((c->master->fiftyval & 1) ^ (sp & 1));
|
||||||
bool dock = false;
|
bool dock = false;
|
||||||
for(int i=0; i<c->type; i+=2) {
|
for(int i=0; i<c->type; i+=2) {
|
||||||
int fiv = createMov(c, i)->master->fiftyval;
|
int fiv = createMov(c, i)->master->fiftyval;
|
||||||
|
@ -917,6 +929,7 @@ int pattern_threecolor(cell *c) {
|
||||||
if(a38) {
|
if(a38) {
|
||||||
patterns::patterninfo si;
|
patterns::patterninfo si;
|
||||||
patterns::val38(c, si, nonbitrunc ? 0 : patterns::SPF_ROT, patterns::PAT_COLORING);
|
patterns::val38(c, si, nonbitrunc ? 0 : patterns::SPF_ROT, patterns::PAT_COLORING);
|
||||||
|
if(whirl::whirl && pseudohept(c)) return 0;
|
||||||
return si.id >> 2;
|
return si.id >> 2;
|
||||||
}
|
}
|
||||||
if(a46 && !nonbitrunc) {
|
if(a46 && !nonbitrunc) {
|
||||||
|
|
|
@ -39,6 +39,13 @@ namespace whirl {
|
||||||
default: return make_pair(0, 0);
|
default: return make_pair(0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int last_dir(cell *c) {
|
||||||
|
int d = -1;
|
||||||
|
while(c != c->master->c7)
|
||||||
|
d = c->spin(0), c = c->mov[0];
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
loc get_coord(cell *c) {
|
loc get_coord(cell *c) {
|
||||||
if(c == c->master->c7) return loc(0,0);
|
if(c == c->master->c7) return loc(0,0);
|
||||||
|
|
Loading…
Reference in New Issue