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

Method getct

app/src/main/java/cs/threephase/Center3.java:84–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82 }
83
84 int getct() {
85 int idx = 0;
86 int r = 4;
87 for (int i = 6; i >= 0; i--) {
88 if (ud[i] != ud[7]) {
89 idx += Cnk[i][r--];
90 }
91 }
92 idx *= 35;
93 r = 4;
94 for (int i = 6; i >= 0; i--) {
95 if (fb[i] != fb[7]) {
96 idx += Cnk[i][r--];
97 }
98 }
99 idx *= 12;
100 int check = fb[7] ^ ud[7];
101 int idxrl = 0;
102 r = 4;
103 for (int i = 7; i >= 0; i--) {
104 if (rl[i] != check) {
105 idxrl += Cnk[i][r--];
106 }
107 }
108 return parity + 2 * (idx + std2rl[idxrl]);
109 }
110
111 void setct(int idx) {
112 parity = idx & 1;

Callers 4

createMoveMethod · 0.95
searchMethod · 0.45
init2Method · 0.45
init3Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected