Warning: session_start(): open(/var/lib/php/sessions/sess_ragfctc5tisngbrfcvlunf935l, 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.
static byte[][] renderLineCompedSingleLevels_raw(LineCompedSingle lc) {
int n = lcLength(lc);
// each byte is the character's "color"
// (0 for empty, 1 for color one, 2 for color two)
L rows = new AutoCreateList<>(() -> new byte[n]);
fill(lc, rows, 0, 0, lc.main, 1);
ret toArray(rows, byte[].class);
}
// returns new x
static int #fill(LineCompedSingle lc, L rows, int x, int y, L symbols, int color) {
printVars_str fill(+x, +y, +symbols, +color);
for (int idx : symbols) {
if (idx < l(lc.literals)) {
rows.get(y)[x] = (byte) color;
x++;
} else {
int newX = fill(lc, rows, x, y+1, intPairToList(lc.getPair(idx)), color);
while (x < newX) rows.get(y)[x++] = (byte) color;
color = 3-color;
}
}
ret x;
}
end scope