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

Method swap

app/src/main/java/solver/Cube222.java:104–116  ·  view source on GitHub ↗
(int first, int second)

Source from the content-addressed store, hash-verified

102 }
103
104 private static void swap(int first, int second) {
105 if (first < 0 || second < 0 || first > 7 || second > 7 || first == second) {
106 return;
107 }
108 //位置交换
109 int tmp = state[0][first];
110 state[0][first] = state[0][second];
111 state[0][second] = tmp;
112 //色相交换
113 tmp = state[1][first];
114 state[1][first] = state[1][second];
115 state[1][second] = tmp;
116 }
117
118 private static void twist(int corner, int value) {
119 if (value < 0) return;

Callers 2

randomEGMethod · 0.95
randomTEGMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected