Anonymous user
Percolation/Site percolation: Difference between revisions
Small improvements in the D entry
(+ C entry) |
(Small improvements in the D entry) |
||
Line 237:
immutable r = rng.front / cast(double)rng.max;
rng.popFront;
cell = (r < probability) ? Cell.empty : Cell.filled;
}
}
Line 245:
line.writeln;
foreach (const ref row; grid)
writeln('|'
line.writeln;
}
|