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

Method move2string

app/src/main/java/solver/Sq1Shape.java:222–244  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

220 }
221
222 private static String move2string() {
223 StringBuilder sb = new StringBuilder("\n\nttm: ");
224 int top = 0, bottom = 0;
225 for (int i = 0; i < sollen; i++) {
226 int val = sol[i];
227 if (val > 0) {
228 top = (val > 6) ? (val - 12) : val;
229 } else if (val < 0) {
230 bottom = (val < -6) ? (-12 - val) : -val;
231 } else {
232 if (top == 0 && bottom == 0) {
233 sb.append(" / ");
234 } else {
235 sb.append('(').append(top).append(',').append(bottom).append(") / ");
236 }
237 top = bottom = 0;
238 }
239 }
240 if (top != 0 || bottom != 0) {
241 sb.append('(').append(top).append(",").append(bottom).append(")");
242 }
243 return sb.toString();
244 }
245
246 public static String solve(int type, String scr) {
247 if (type == 0) return "";

Callers 1

solveTwsMethod · 0.95

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected