4c4 < Future Choices Game - Choice of Two via Timed Clicking of Correct One - RJM Programming - November, 2015 - Thanks to http://stackoverflow.com/questions/20217869/how-to-spin-an-image-horizontally-with-css --- > Future Choices Game - Choice of Two via Striking Wrong One - RJM Programming - November, 2015 28,39d27 < < .dirh { < -moz-animation: spinHorizontal 2.8s infinite linear; < -o-animation: spinHorizontal 2.8s infinite linear; < -webkit-animation: spinHorizontal 2.8s infinite linear; < animation: spinHorizontal 2.8s infinite linear; < } < < @keyframes spinHorizontal { < 0% { transform: rotateY(0deg); } < 100% { transform: rotateY(360deg); } < } 44c32 < var score=0, goes=0, putback='', timesecs=0, firstgo=true, zero=0, fullcycle=4800, bitcycle=eval(fullcycle / 4); --- > var score=0, goes=0, putback=''; 61d48 < var aswas=new Array(); 63,100d49 < var goodanswers=new Array(); < < var strike=''; < var passeds=''; < var thistitle='Future Choices'; < < function changes() { < if (firstgo) { < firstgo=false; < for (var i=0; i= fullcycle) { < zero=eval(1 - zero); < for (var ii=0; ii var was=''; > var idis=thiso.id; > var otherid=idis.replace('but1for', 'buttwofor').replace('but2for', 'butonefor').replace('butone', 'but1').replace('buttwo', 'but2'); > var versusone=''; 142d71 < } 146c75 < putback="document.getElementById('" + otherid + "').innerHTML=strike + document.getElementById('" + otherid + "').innerHTML.replace('','').replace('','') + strike.replace(' putback="document.getElementById('" + otherid + "').innerHTML='' + document.getElementById('" + otherid + "').innerHTML.replace('','').replace('','') + '';" 151c80 < } else if (strike != '') { --- > } else { 166,181d94 < } else { < doputback(); < goes++; < if (versusone != correctone) { < score++; < document.getElementById('score').innerHTML='Score: ' + score + ' Goes: ' + goes; < was=document.getElementById(idis).innerHTML; < was=was.replace('',''); < was=was.replace('',''); < document.getElementById(idis).innerHTML=was; < document.getElementById(otherid).innerHTML=''; < } else { < document.getElementById('score').innerHTML='Score: ' + score + ' Goes: ' + goes; < alert('Try again.'); < } < } 186,190d98 < strike=location.search.split('strike=')[1] ? '' : ''; < passeds=location.search.split('sentences=')[1] ? location.search.split('sentences=')[1].split('&')[0] : ''; < if (passeds != '') eval('sentences=[' + decodeURIComponent(passeds) + ']'); < thistitle=location.search.split('title=')[1] ? location.search.split('title=')[1].split('&')[0] : 'Future Choices'; < if (thistitle != 'Future Choices') thistitle=decodeURIComponent(thistitle); 193,196d100 < if (thistitle != 'Future Choices') document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Future Choices', thistitle); < if (strike != '') { < document.getElementById('score').innerHTML=document.getElementById('score').innerHTML.replace('Correct One (as it appears)','Wrong One'); < } 204,206d107 < aswas.push(choices[0] + ";" + choices[1]); < goodanswers.push(choices[eval(0 + eval(choices[2]))]); < if (strike != '') { 209,212d109 < } else { < answers.push(choices[eval(1 - eval(choices[2]))]); < tbo.innerHTML+='' + postbits[0] + '' + strike + choices[0] + strike.replace('
' + strike + choices[1] + strike.replace('' + bits[1] + ''; < } 217c114 < if (strike == '') setTimeout(changes, bitcycle); --- > 224,295d120 < < function toggle() { < if (document.URL.indexOf('strike=') != -1) { < location.href=document.URL.replace('strike=','nowayjose='); < } else if (document.URL.indexOf('STRIKE=') != -1) { < location.href=document.URL.replace('STRIKE=','nowayjose='); < } else if (document.URL.indexOf('?') == -1) { < location.href=document.URL + '?strike=y'; < } else { < location.href=document.URL + '&strike=y'; < } < } < < function owndata() { < var ours=prompt('Optionally specify your own sentences in format like below (where number at end of slash grouping is zero-start indicator of correct answer of two before it, and [] lead should be adhered to ... ' + "\n\n" + '"Look at the quote. It [will cost/is going to cost/1] $14000 to fix the roof.","We think it [will cost/is going to cost/0] around $200 for a new gate."',''); < var spare, postspare, lh=''; < if (ours != null) { < if (ours != '') { < if (document.URL.indexOf('sentences=') != -1) { < spare=document.URL.split('sentences='); < postspare=spare[1].split('&'); < lh=document.URL.replace('sentences=' + postspare[0], 'sentences=' + encodeURIComponent(ours)); < } else if (document.URL.indexOf('SENTENCES=') != -1) { < spare=document.URL.split('SENTENCES='); < postspare=spare[1].split('&'); < lh=document.URL.replace('SENTENCES=' + postspare[0], 'sentences=' + encodeURIComponent(ours)); < } else if (document.URL.indexOf('?') == -1) { < lh=document.URL + '?sentences=' + encodeURIComponent(ours); < } else { < lh=document.URL + '&sentences=' + encodeURIComponent(ours); < } < owntitle(lh); < } < } < } < < function owntitle(du) { < var ours=prompt('Optionally specify your own title. Optionally suffix it by ~ to toggle mode of use among Horizontal Flip Click or Strike Reject (from what it is now).',thistitle); < var spare, postspare; < if (du == "") du = document.URL; < if (ours != null) { < if (ours.indexOf('~') != -1) { < if (du.indexOf('strike=') != -1) { < du=du.replace('strike=','nowayjose='); < } else if (du.indexOf('STRIKE=') != -1) { < du=du.replace('STRIKE=','nowayjose='); < } else if (du.indexOf('?') == -1) { < du=du + '?strike=y'; < } else { < du=du + '&strike=y'; < } < ours=ours.replace(/~/g, ""); < if (ours == '') location.href=du; < } < if (ours != '') { < if (du.indexOf('title=') != -1) { < spare=du.split('title='); < postspare=spare[1].split('&'); < du=du.replace('title=' + postspare[0], 'title=' + encodeURIComponent(ours)); < } else if (document.URL.indexOf('TITLE=') != -1) { < spare=du.split('TITLE='); < postspare=spare[1].split('&'); < du=du.replace('TITLE=' + postspare[0], 'title=' + encodeURIComponent(ours)); < } else if (du.indexOf('?') == -1) { < du=du + '?title=' + encodeURIComponent(ours); < } else { < du=du + '&title=' + encodeURIComponent(ours); < } < location.href=du; < } < } < } 298,303c123,126 < <
<


Future Choices Thanks to "How English Works" by Michael Swan and Catherine Walter

<


RJM Programming - November, 2015

<

Please Click the Correct One (as it appears) - Score: 0 Goes: 0

<
--- > >


Future Choices Thanks to "How English Works" by Michael Swan and Catherine Walter

>


RJM Programming - November, 2015

>

Please Click the Wrong One - Score: 0 Goes: 0