diff --git a/public/header.js b/public/header.js index faf8aed..4bcf110 100644 --- a/public/header.js +++ b/public/header.js @@ -20,9 +20,9 @@ function rand(x) { } function shuffle(lst) { - for (var i = 0; i < lst.length; ++i) { - var tmp = lst[i] - var j = rand(i); + for (var i = lst.length - 1; i > 0; --i) { + var j = Math.floor(Math.random() * (i + 1)); + var tmp = lst[i]; lst[i] = lst[j]; lst[j] = tmp; } diff --git a/public/index.css b/public/index.css index a9157f4..34eb834 100644 --- a/public/index.css +++ b/public/index.css @@ -254,7 +254,7 @@ svg .stripe.purple { padding: 20px; border: 1px solid #888; width: 80%; /* Could be more or less, depending on screen size */ - background-color: 000000; + background-color: #000000; } /* The Close Button */ diff --git a/public/variants.js b/public/variants.js index 4261157..391b4dd 100644 --- a/public/variants.js +++ b/public/variants.js @@ -20,7 +20,7 @@ function isNotNull(set) { function isStandardSet(set) { if (isNotNull(set) && set.length == 3) { - for (z of ['count', 'color', 'shading', 'shape']) { + for (var z of ['count', 'color', 'shading', 'shape']) { var a = set[0][z], b = set[1][z], c = set[2][z]; if ((a + b + c) % 3 != 0) { return false; @@ -35,7 +35,7 @@ function isSuperSet(set) { if (isNotNull(set) && set.length == 4) { for (var j of [1, 2, 3]) { var cnt = 0; - for (z of ['count', 'color', 'shading', 'shape']) { + for (var z of ['count', 'color', 'shading', 'shape']) { var a = set[0][z], b = set[j][z]; var cd = set[1][z] + set[2][z] + set[3][z] - b; if ((a + b - cd) % 3 != 0) { @@ -220,4 +220,4 @@ Variants = { superset: superset, hiddenset: hiddenset, powerset: powerset -} \ No newline at end of file +}