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

Method move

app/src/main/java/solver/Floppy.java:99–118  ·  view source on GitHub ↗
(int turn)

Source from the content-addressed store, hash-verified

97 }
98
99 private static void move(int turn) {
100 switch (turn) {
101 case 0: //U
102 Utils.swap(img, 0, 2, 3, 7);
103 Utils.swap(img, 4, 8, 6, 10);
104 Utils.swap(img, 5, 9); break;
105 case 1: //R
106 Utils.swap(img, 7, 23, 2, 29);
107 Utils.swap(img, 6, 24, 22, 8);
108 Utils.swap(img, 14, 16); break;
109 case 2: //D
110 Utils.swap(img, 27, 29, 19, 23);
111 Utils.swap(img, 20, 24, 22, 26);
112 Utils.swap(img, 21, 25); break;
113 case 3: //L
114 Utils.swap(img, 3, 19, 0, 27);
115 Utils.swap(img, 4, 26, 20, 10);
116 Utils.swap(img, 12, 18); break;
117 }
118 }
119
120 public static int[] image(String scr) {
121 initColor();

Callers 1

imageMethod · 0.95

Calls 1

swapMethod · 0.95

Tested by

no test coverage detected