Warning: session_start(): open(/var/lib/php/sessions/sess_k34l2r4hdlvdefeafvp5p0iejm, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
scope renderLineCompedSingleLevels_raw_v2.
static int[][] renderLineCompedSingleLevels_raw_v2(LineCompedSingle lc) {
int n = lcLength(lc);
// each matrix element is the symbol starting position for the character+1 (or 0 for empty)
L rows = new AutoCreateList<>(() -> new int[n]);
fill(lc, rows, 0, 0, lc.main);
ret toArray(rows, int[].class);
}
// returns new x
static int #fill(LineCompedSingle lc, L rows, int x, int y, L symbols) {
//printVars_str fill(+x, +y, +symbols);
for (int idx : symbols) {
if (idx < l(lc.literals)) {
rows.get(y)[x] = x+1;
x++;
} else {
int newX = fill(lc, rows, x, y+1, intPairToList(lc.getPair(idx)));
int x1 = x;
while (x < newX) rows.get(y)[x++] = x1+1;
}
}
ret x;
}
end scope