add randomize flag

This commit is contained in:
Bruno Rybársky 2022-01-16 17:46:16 +01:00
parent ab877ff35b
commit c4a5e80046

@ -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 () {