more work on Euclidean Squares

This commit is contained in:
Zeno Rogue
2017-12-18 19:04:37 +01:00
parent 836ed087df
commit 5185f0e186
4 changed files with 53 additions and 30 deletions
+11 -2
View File
@@ -7,7 +7,7 @@ int eupattern(cell *c) {
if(torus) return (decodeId(c->master)*2) % 3;
eucoord x, y;
decodeMaster(c->master, x, y);
return (x&1) + (y&1);
return ((x&1) - (y&1)) % 3;
}
if(torus) return (decodeId(c->master)*2) % 3;
eucoord x, y;
@@ -18,6 +18,12 @@ int eupattern(cell *c) {
return z;
}
int eupattern4(cell *c) {
eucoord x, y;
decodeMaster(c->master, x, y);
return (x&1) + ((y&1)) * 2;
}
bool ishept(cell *c) {
// EUCLIDEAN
if(euclid) return eupattern(c) == 0;
@@ -850,7 +856,10 @@ int pattern_threecolor(cell *c) {
int i = si.id;
return i >> 2;
}
if(euclid) return (eupattern(c)+1) % 3;
if(euclid) {
if(a4 && nontruncated) return eupattern4(c);
return eupattern(c) % 3;
}
if(S7 == 4 && S3 == 3) {
int codesN[6] = {0,1,2,1,2,0};
if(nontruncated)