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

Method doMove

app/src/main/java/solver/Cube222.java:73–102  ·  view source on GitHub ↗
(int m, int n)

Source from the content-addressed store, hash-verified

71 }
72
73 private static void doMove(int m, int n) {
74 n %= 4;
75 if (n > 0) {
76 switch (m) {
77 case 0: //U
78 case 1: //R
79 case 2: //F
80 case 3: //D
81 case 4: //L
82 case 5: //B
83 for (int i = 0; i < n; i++) {
84 permMove(state[0], m);
85 twistMove(state[1], m);
86 }
87 break;
88 case 6: //y
89 case 7: //x
90 case 8: //z
91 for (int i = 0; i < n; i++) {
92 permMove(state[0], m - 6);
93 twistMove(state[1], m - 6);
94 }
95 for (int i = 0; i < 4 - n; i++) {
96 permMove(state[0], m - 3);
97 twistMove(state[1], m - 3);
98 }
99 break;
100 }
101 }
102 }
103
104 private static void swap(int first, int second) {
105 if (first < 0 || second < 0 || first > 7 || second > 7 || first == second) {

Callers 2

randomEGMethod · 0.95
randomTEGMethod · 0.95

Calls 2

permMoveMethod · 0.95
twistMoveMethod · 0.95

Tested by

no test coverage detected