3,4c3 <
Score 0 achieved via 0 goes and your current answer is
--- >Score 0 achieved via 0 goes and your current answer is
208d184 < var iuo = document.getElementById('iuo'); 214,258d189 < var iDoubleClickInterval = 500; < var previewTimestamp = -1; < var yesplease = 0; < < elem.addEventListener("gesturestart", gestureStart, false); < < elem.addEventListener("gesturechange", gestureChange, false); < < elem.addEventListener("gestureend", gestureEnd, false); < < function gestureStart(e) { < //e.preventDefault(); < } < < function gestureEnd(e) { < //e.preventDefault(); < if (toggle == 1 && withingesture == 0) { < withingesture = 1; < yesplease = 1; < fansweridea(actsym); < yesplease = 0; < withingesture = 0; < e.preventDefault(); < } < } < < function gestureChange(e) { < //e.preventDefault(); < } < < // Add event listener for `onMouseUp` events. < elem.addEventListener('mouseup', function(e) { < < if (previewTimestamp > 0) < { < if (eval(e.timeStamp - previewTimestamp) < iDoubleClickInterval) < { < yesplease = 1; < } < previewTimestamp = e.timeStamp; < } < else { < previewTimestamp = e.timeStamp; < } < }, false); 280d210 < iuo.value = ''; 283c213 < document.getElementById('myh1').innerHTML = 'Change your answer and click chalkboard to reveal answer (or ' + ouraction + ' for help on next problem) ... Take fewest goes to reach score of 20'; --- > document.getElementById('myh1').innerHTML = 'Change your answer and click chalkboard to reveal answer ... Take fewest goes to reach score of 20'; 288,289c218,219 < //goes = goes + 1.0; < //realgoes = realgoes + 1.0; --- > goes = goes + 1.0; > realgoes = realgoes + 1.0; 293c223 < window.location = './fraction_withdoubleclick_chalkboard.html'; --- > window.location = './fraction_chalkboard.html'; 300d229 < yesplease = 0; 304,373d232 < function giveadvice() { < var ihiuo = iuo.value.replace(") / (", ") ("); < var ii, advice = "The " + ihiuo + " problem can be broken down into 3 questions? Firstly, what is a common denominator for "; < if (ihiuo != '') { < var slasha = ihiuo.split('/'); < var myn1a = slasha[0].split('('); < var myn1 = myn1a[myn1a.length - 1].replace(' ', ''); < var myd1a = slasha[1].split(')'); < var myd1 = myd1a[0].replace(' ',''); < var myopa = (" " + myd1a[1]).split('('); < var myop = myopa[0].replace(' ',''); < myop = myop.replace(' ','').replace(' ','').replace(' ',''); < if (myop == '') myop = actsym; < if (myop == '') myop = "/"; < var myopai = myopa.length - 1; < var myn2a = myopa[myopai].split('/'); < var myn2 = myn2a[myn2a.length - 1].replace(' ', ''); < var myd2a = slasha[slasha.length - 1].split(')'); < var myd2 = myd2a[0].replace(' ',''); < for (ii=0; ii<=myd1; ii++) { < if (ii == 0) advice = advice + '('; < if (ii < myd1) advice = advice + '# '; < if (ii == myd1) advice = advice + ') and '; < } < for (ii=0; ii<=myd2; ii++) { < if (ii == 0) advice = advice + '('; < if (ii < myd2) advice = advice + '# '; < if (ii == myd2) advice = advice + ')? Secondly, respective to first denominator changes (if any) multiply, as required, respectively, numerators '; < } < for (ii=0; ii<=myn1; ii++) { < if (ii == 0) advice = advice + '('; < if (ii < myn1) advice = advice + '# '; < if (ii == myn1) advice = advice + ') and '; < } < for (ii=0; ii<=myn2; ii++) { < if (ii == 0) advice = advice + '('; < if (ii < myn2) advice = advice + '# '; < if (ii == myn2) advice = advice + ') by the relevant factors? Lastly, '; < } < if (myop == '+') { < advice = advice + 'what is first adjusted numerator1/denominator1 fraction added to second numerator2/denominator2 fraction (with same denominators)?'; < } else if (myop == '-') { < advice = advice + 'what is second adjusted numerator2/denominator2 fraction subtracted from first adjusted numerator1/denominator1 fraction (with same denominators)?'; < } else if (myop == '*') { < advice = 'Regarding ' + ihiuo.replace(") (", ") / (") + ' problem what is (' + myn1 + ' times ' + myn2 + ') over (' + myd1 + ' times ' + myd2 + '), as a fraction? This is like asking how many (' + myd2 + ' times ' + myd1 + ') are there in (' + myn1 + ' times ' + myn2 + '), as a number?'; < } else if (myop == '/') { < advice = 'Regarding ' + ihiuo.replace(") (", ") / (") + ' problem what is (' + myn1 + ' times ' + myd2 + ') over (' + myd1 + ' times ' + myn2 + '), as a fraction? This is like asking how many (' + myd1 + ' times ' + myn2 + ') are there in (' + myn1 + ' times ' + myd2 + '), as a number?'; < } < var pa; < if (lastadvice != advice) { < pa = prompt(advice, ''); < lastadvice = advice; < if (pa != null) { < if (pa != '') { < zz = "00"; < document.getElementById('guess').value = pa; < assess("0"); < } < } < } < zz = "0"; < } < } < < function doclick() { < elem.click(); < } < < setTimeout(doclick, 1000); < 406,413d264 < var one = 1; < if (myin == "00") { < myin = "0"; < one = 0; < } else if (myin == "0") { < goes = goes + 1.0; < realgoes = realgoes + 1.0; < } 433,435c284,286 < //goes = goes + one; < //realgoes = realgoes + one; < score = score + one; --- > goes = goes + 1; > realgoes = realgoes + 1; > score = score + 1; 447,448c298,299 < //goes = goes + one; < //realgoes = realgoes + one; --- > goes = goes + 1; > realgoes = realgoes + 1; 467,468c318 < var mrand = 0, srand=0, nrand=0, frand=0, lx=inx, ly=iny, nx=inx, ny=iny, mx, my, j, k, tn=""; < xrand = 0; --- > var mrand = 0, srand=0, nrand=0, frand=0, xrand=0, lx=inx, ly=iny, nx=inx, ny=iny, mx, my, j, k, tn=""; 614d463 < 638,642d486 < < < < <