From d93f2ba9f074464f5e20f9711563ff08e3eb19a6 Mon Sep 17 00:00:00 2001 From: Ian Coleman Date: Mon, 11 Nov 2019 10:15:49 +1100 Subject: Remove trailing comments --- src/js/index.js | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/js/index.js b/src/js/index.js index edd70c5..472d392 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1450,27 +1450,27 @@ } function writeSplitPhrase(phrase) { - var wordCount = phrase.split(/\s/g).length; //get number of words in phrase - var left=[]; //initialize array of indexs - for (var i=0;i0) { //while indexs left - groupI=(groupI+1)%3; //get next group to insert index into - seed = seed * 16807 % 2147483647; //change random value.(simple predicatable random number generator works well for this use) - var selected=Math.floor(left.length*(seed - 1) / 2147483646); //get index in left we will use for this group - group[groupI].push(left[selected]); //add index to group - left.splice(selected,1); //remove selected index - } - var cards=[phrase.split(/\s/g),phrase.split(/\s/g),phrase.split(/\s/g)];//make array of cards - for (var i=0;i<3;i++) { //go through each card - for (var ii=0;ii0) { + groupI=(groupI+1)%3; + seed = seed * 16807 % 2147483647; + var selected=Math.floor(left.length*(seed - 1) / 2147483646); + group[groupI].push(left[selected]); + left.splice(selected,1); + } + var cards=[phrase.split(/\s/g),phrase.split(/\s/g),phrase.split(/\s/g)]; + for (var i=0;i<3;i++) { + for (var ii=0;ii