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

Method pieceAt

app/src/main/java/cs/sq12phase/FullCube.java:97–109  ·  view source on GitHub ↗
(int idx)

Source from the content-addressed store, hash-verified

95 }
96
97 private byte pieceAt(int idx) {
98 int ret;
99 if (idx < 6) {
100 ret = ul >> ((5 - idx) << 2);
101 } else if (idx < 12) {
102 ret = ur >> ((11 - idx) << 2);
103 } else if (idx < 18) {
104 ret = dl >> ((17 - idx) << 2);
105 } else {
106 ret = dr >> ((23 - idx) << 2);
107 }
108 return (byte) (ret & 0x0f);
109 }
110
111 private void setPiece(int idx, int value) {
112 if (idx < 6) {

Callers 2

getParityMethod · 0.95
getSquareMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected