added script to generate random patterns

This commit is contained in:
JOLIMAITRE Matthieu 2022-10-15 04:36:53 +02:00
parent dc2a80bf4f
commit 1c1ad2c4fd
5 changed files with 208 additions and 164 deletions

View file

@ -2,6 +2,10 @@
const { args } = Deno;
if (args[0] == "--help") {
console.log("usage: [bin] <size> <frequency>");
}
const size = parseInt(args[0] ?? "5");
const frequency = parseFloat(args[1] ?? "0.5");
@ -18,4 +22,4 @@ for (const _y of range(0, size)) {
result += '\n';
}
console.log(result);
console.log(result);