MCPcopy Index your code
hub / github.com/apache/groovy / serialize

Method serialize

benchmark/bench/meteor.java:232–248  ·  view source on GitHub ↗

Serializes the current solution to a string.

(Entry[] solution)

Source from the content-addressed store, hash-verified

230 */
231
232 private String serialize (Entry[] solution)
233 { char[] puzzle = new char[50];
234 Shape shape;
235 int row;
236 int col;
237
238 for (Entry entry: solution)
239 { shape = entry.shape;
240 row = entry.row;
241 col = entry.col;
242
243 for (int[] xy: shape.vector)
244 puzzle[5 * (row + xy[0]) + (col + xy[1])/2] = shape.symbol;
245 }
246
247 return new String(puzzle);
248 }
249
250 // INNER CLASSES
251

Callers 1

solveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected