diff --git a/cell.cpp b/cell.cpp index 2a72d937..502c899b 100644 --- a/cell.cpp +++ b/cell.cpp @@ -221,7 +221,7 @@ namespace torusconfig { // values as the default -- otherwise the three-color // pattern breaks. Also, they should have no common // prime divisor. - int qty = 127*3, dx = -1, dy = 11*2; + int qty = 127*3, dx = 1, dy = -11*2; } int decodeId(heptagon* h); @@ -724,7 +724,7 @@ void verifycells(heptagon *at) { } int eupattern(cell *c) { - if(torus) return decodeId(c->master) % 3; + if(torus) return (decodeId(c->master)*2) % 3; eucoord x, y; decodeMaster(c->master, x, y); short z = (short(y+2*x))%3; diff --git a/landgen.cpp b/landgen.cpp index 7fe8ef8a..e22d92b1 100644 --- a/landgen.cpp +++ b/landgen.cpp @@ -1002,8 +1002,8 @@ void giantLandSwitch(cell *c, int d, cell *from) { if(torus) { int pid = decodeId(c->master); - if(pid == 381/3) c->wall = waCharged; - if(pid == 381*2/3) c->wall = waGrounded; + if(pid == torusconfig::qty/3) c->wall = waCharged; + if(pid == torusconfig::qty*2/3) c->wall = waGrounded; } else if(euclid) { eucoord x, y;