From c4a5e80046839fb2c53a487b2e6fd5c5b6bc3467 Mon Sep 17 00:00:00 2001 From: BRNSystems <70092437+BRNSystems@users.noreply.github.com> Date: Sun, 16 Jan 2022 17:46:16 +0100 Subject: [PATCH] add randomize flag --- index.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index c4eb31d..28654a1 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,7 @@ let waux = 10; let haux = 10; let x = "✔"; let o = "⬤"; +let randomize = true; let lauxgrid = new Array(w); let rauxgrid = new Array(w); //Write arrays to html @@ -99,10 +100,12 @@ function randomizeaux(){ function main() { inittable(); initauxtable(); - randomizetable(); - writegrid(); - randomizeaux(); - writeauxgrid(); + if (randomize) { + randomizetable(); + writegrid(); + randomizeaux(); + writeauxgrid(); + } } $(function () {