1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 01:20:37 +00:00

twisttest

This commit is contained in:
Zeno Rogue 2019-04-16 04:14:36 +02:00
parent d00d04e313
commit 21985e4317

View File

@ -1111,6 +1111,24 @@ namespace euclid3 {
shift(); twisted0 = argi(); shift(); twisted0 = argi();
build_torus3(); build_torus3();
} }
else if(argis("-twisttest")) {
start_game();
celllister cl(cwt.at, 10000, 10000, NULL);
for(cell *c: cl.lst) {
for(int i=0; i<S7; i++)
for(int j=0; j<S7; j++)
for(int k=0; k<S7; k++)
for(int l=0; l<S7; l++)
if(c->move(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; else return 1;
return 0; return 0;