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

Method eoline

app/src/main/java/solver/EOline.java:90–114  ·  view source on GitHub ↗
(String scramble, int face)

Source from the content-addressed store, hash-verified

88 }
89
90 private static String eoline(String scramble, int face) {
91 String[] s = scramble.split(" ");
92 int ep = 106, eo = 0;
93 for (int d = 0; d < s.length; d++) {
94 if (s[d].length() > 0) {
95 int o = moveStr[face].indexOf(s[d].charAt(0));
96 ep = epm[ep][o]; eo = eom[eo][o];
97 if (s[d].length() > 1) {
98 eo = eom[eo][o]; ep = epm[ep][o];
99 if (s[d].charAt(1) == '\'') {
100 eo = eom[eo][o]; ep = epm[ep][o];
101 }
102 }
103 }
104 }
105 for (int d = 0; d < 10; d++) {
106 if (search(eo, ep, d, -1)) {
107 StringBuilder sb = new StringBuilder();
108 for (int j = d; j > 0; j--)
109 sb.append(' ').append(turn[seq[j] / 3]).append(suff[seq[j] % 3]);
110 return "\n" + sideStr[face] + ": " + rotateStr[face] + sb.toString();
111 }
112 }
113 return "\nerror";
114 }
115
116 public static String solveEoline(String scramble, int face) {
117 StringBuilder sb = new StringBuilder("\n");

Callers 1

solveEolineMethod · 0.95

Calls 4

searchMethod · 0.95
lengthMethod · 0.80
indexOfMethod · 0.80
toStringMethod · 0.80

Tested by

no test coverage detected