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

Method topMove

app/src/main/java/cs/sq12phase/Shape.java:39–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 }
38
39 private int topMove() {
40 int move = 0;
41 int moveParity = 0;
42 do {
43 if ((top & 0x800) == 0) {
44 move += 1;
45 top = top << 1;
46 } else {
47 move += 2;
48 top = (top << 2) ^ 0x3003;
49 }
50 moveParity = 1 - moveParity;
51 } while ((Integer.bitCount(top & 0x3f) & 1) != 0);
52 if ((Integer.bitCount(top) & 2) == 0) {
53 parity ^= moveParity;
54 }
55 return move;
56 }
57
58 private int bottomMove() {
59 int move = 0;

Callers 1

initMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected