From 21985e4317cf0ac0588b5dbb752bf398676b8716 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 16 Apr 2019 04:14:36 +0200 Subject: [PATCH] twisttest --- euclid.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/euclid.cpp b/euclid.cpp index 5b820806..f8c29098 100644 --- a/euclid.cpp +++ b/euclid.cpp @@ -1111,6 +1111,24 @@ namespace euclid3 { shift(); twisted0 = argi(); build_torus3(); } + else if(argis("-twisttest")) { + start_game(); + celllister cl(cwt.at, 10000, 10000, NULL); + for(cell *c: cl.lst) { + for(int i=0; imove(i) && c->move(k) && c->move(i)->move(j) == c->move(k)->move(l) && c->move(i)->move(j)) { + transmatrix T1 = move_matrix(c, i) * move_matrix(c->move(i), j); + transmatrix T2 = move_matrix(c, k) * move_matrix(c->move(k), l); + if(!eqmatrix(T1, T2)) { + println(hlog, c, " @ ", getcoord(cubemap()->ispacemap[c->master]), " : ", i, "/", j, "/", k, "/", l, " :: ", T1, " vs ", T2); + exit(1); + } + } + } + } else return 1; return 0;