MCPcopy Create free account
hub / github.com/MeigenChou/DCTimer-Android / twistMove

Method twistMove

app/src/main/java/solver/Cube222.java:45–71  ·  view source on GitHub ↗
(int[] ps, int m)

Source from the content-addressed store, hash-verified

43 }
44
45 private static void twistMove(int[] ps, int m) {
46 int c;
47 switch (m) {
48 case 0:
49 Utils.circle(ps, 0, 1, 3, 2); //U
50 break;
51 case 1:
52 Utils.circle(ps, 0, 4, 5, 1, new int[] {2, 1, 2, 1}); //R
53 //c = ps[0]; ps[0] = ps[4] + 2; ps[4] = ps[5] + 1; ps[5] = ps[1] + 2; ps[1] = c + 1;
54 break;
55 case 2:
56 Utils.circle(ps, 0, 2, 6, 4, new int[] {1, 2, 1, 2}); //F
57 //c = ps[0]; ps[0] = ps[2] + 1; ps[2] = ps[6] + 2; ps[6] = ps[4] + 1; ps[4] = c + 2; //F
58 break;
59 case 3:
60 Utils.circle(ps, 4, 6, 7, 5); //D
61 break;
62 case 4:
63 Utils.circle(ps, 2, 3, 7, 6, new int[] {1, 2, 1, 2}); //L
64 //c = ps[2]; ps[2] = ps[3] + 1; ps[3] = ps[7] + 2; ps[7] = ps[6] + 1; ps[6] = c + 2; //L
65 break;
66 case 5:
67 Utils.circle(ps, 1, 5, 7, 3, new int[] {2, 1, 2, 1}); //B
68 //c = ps[1]; ps[1] = ps[5] + 2; ps[5] = ps[7] + 1; ps[7] = ps[3] + 2; ps[3] = c + 1; //B
69 break;
70 }
71 }
72
73 private static void doMove(int m, int n) {
74 n %= 4;

Callers 2

doMoveMethod · 0.95
gettwsmvMethod · 0.95

Calls 1

circleMethod · 0.95

Tested by

no test coverage detected