From cfc2b47f4549dec4ef0339fc3ad5a3247d96c246 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Mon, 28 Dec 2020 22:59:06 +0100 Subject: [PATCH] Stop after 100 iterations It gets too slow way before that. --- aztec_diamond.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aztec_diamond.js b/aztec_diamond.js index 5679cc2..a29335f 100644 --- a/aztec_diamond.js +++ b/aztec_diamond.js @@ -223,7 +223,9 @@ function step(state) { } else { throw("impossible state " + state.phase) } - window.setTimeout(step, 100, state) + if (state.n < 100) { + window.setTimeout(step, 100, state) + } }