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

Method permMove

app/src/main/java/solver/Floppy.java:36–45  ·  view source on GitHub ↗
(int cp, int m)

Source from the content-addressed store, hash-verified

34 }
35
36 private static int permMove(int cp, int m) {
37 Utils.idxToPerm(arr, cp, 4, false);
38 switch (m) {
39 case 0: Utils.swap(arr, 0, 1); break; //U2
40 case 1: Utils.swap(arr, 1, 2); break; //R2
41 case 2: Utils.swap(arr, 2, 3); break; //D2
42 case 3: Utils.swap(arr, 0, 3); break; //L2
43 }
44 return Utils.permToIdx(arr, 4, false);
45 }
46
47 private static int flipMove(int eo, int m) {
48 Utils.idxToFlip(arr, eo, 4, false);

Callers 2

FloppyClass · 0.95
searchMethod · 0.95

Calls 3

idxToPermMethod · 0.95
swapMethod · 0.95
permToIdxMethod · 0.95

Tested by

no test coverage detected