15 int l[] = { rand()%10 + 1, rand()%10 + 1, rand()%10 + 1 , rand()%10 + 1 };
17 n = new neigh(4,l[0],l[1],l[2],l[3]);
19 cout << l[0] << "x" << l[1] << "x" << l[2] << "x" << l[3] << endl;
21 for(int itry=0; itry<100000; itry++)
25 if(dir0 <= dir1) dir1++;
27 int l0 = rand()%(3*l[dir0]);
28 int l1 = rand()%(3*l[dir1]);
30 int startpos = rand()%l[0] + (rand()%l[1])*l[0] + (rand()%l[2])*l[0]*l[1] + (rand()%l[3])*l[0]*l[1]*l[2];
34 for(int istep=0; istep<l0; istep++) pos = (*n)[pos*8+dir0];
35 for(int istep=0; istep<l1; istep++) pos = (*n)[pos*8+dir1];
36 for(int istep=0; istep<l0; istep++) pos = (*n)[pos*8+dir0+4];
37 for(int istep=0; istep<l1; istep++) pos = (*n)[pos*8+dir1+4];
39 if( pos != startpos ) {
40 cout << "OHOH!!!" << endl;