3c3 < SOS Game - RJM Programming - August, 2022 --- > Word Find Game - RJM Programming - August, 2022 60,61c60 < color: transparent; < visibility: hidden; --- > color: black; 64c63 < /* text-shadow: -1px 1px 1px #952dff; */ --- > text-shadow: -1px 1px 1px #952dff; 89c88 < color: transparent; --- > color: black; 99c98 < color: transparent; --- > color: black; 116,121d114 < color: transparent; < outline: 1px dotted #000000; < } < < span.wunderlay:hover { < background-image: linear-gradient(to bottom, rgba(128,0,128,0.5) , rgba(0,0,255,0.5)); 125,128c118,121 < <

SOS Game for
 

<

RJM Programming - August, 2022 ... Score 0/0 ... Forwards, backwards, up, down, diagonally 3 SOS letters highlight below top click S bottom click O

<

Thanks to How to Play - SOS

--- > >

Word Find Game for
 

>

RJM Programming - August, 2022 ... Score 0/0 ... Forwards, backwards, up, down, diagonal 4 letters or more highlight below

>

Thanks to Selection API

136,139d128 < var xx=0, yy=0; < var sbs=[]; < var changeu=false; < var bcols=['#0000ff','#00ff00','#ff0000','#ffff00','#ff00ff','#00ffff','#777777','#000077','#007700','#770000','#777700','#770077','#007777']; 142c131 < var ascores=[0], agoes=[0], anames=['Player 1'], fnames=['Player 1']; --- > var ascores=[0], agoes=[0], anames=['Player 1']; 150d138 < var sparecurplayer=0; 158c146 < var letters=['s','o','s','o','s','o','s','o','s','o','s','o','s','o','s','o','s','o','s','o','s','o','s','o','s','o']; --- > var letters=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; 163c151 < var documentURL=document.URL + '#clicks=y'; --- > var documentURL=document.URL; 181c169 < wdebye+=' '; --- > wdebye+='' + aletter + ''; 205,220d192 < function sb(inho) { < sbs.push(inho); < return inho; < } < < function sbord() { < if (sbs.length > 0) { < for (var isbs=0; isbsSO") no-repeat coontain'; < sbs[isbs].cursor='pointer'; //'url("data:image/svg+xml;utf8,SO") 16 0, progress'; < } < } < sbs=[]; < } < 269c241 < document.getElementById('styleothers').innerHTML='')[0].replace(/Courier\ New/g,'Courier').replace(/ glow\ 1s/g,' wglow 1s').replace(/black/g,'transparent').replace('#f0fJUNK0f0;', '#f0f0f0; text-shadow: -1px 1px 1px #952dff; ') + ' '; --- > document.getElementById('styleothers').innerHTML='')[0].replace(/Courier\ New/g,'Courier').replace(/ glow\ 1s/g,' wglow 1s').replace(/black/g,'transparent').replace('#f0f0f0;', '#f0f0f0; text-shadow: -1px 1px 1px #952dff; ') + ' '; 289c261 < myblurb=myblurb.replace(' letters', ' more common set of letters'); --- > myblurb=myblurb.replace(' letters ', ' more common set of letters '); 295c267 < myblurb=myblurb.replace(' letters', ' more common set of letters'); --- > myblurb=myblurb.replace(' letters ', ' more common set of letters '); 298c270 < myblurb=myblurb.replace('Forwards 3', 'Forwards, backwards 3'); --- > myblurb=myblurb.replace('Forwards 4', 'Forwards, backwards 4'); 301,303c273,275 < myblurb=myblurb.replace(' letters', ' more common set of letters'); < myblurb=myblurb.replace('Forwards 3', 'Forwards, backwards, up, down, diagonal 3'); < myblurb=myblurb.replace('Forwards, backwards 3', 'Forwards, backwards, up, down, diagonal 3'); --- > myblurb=myblurb.replace(' letters ', ' more common set of letters '); > myblurb=myblurb.replace('Forwards 4', 'Forwards, backwards, up, down, diagonal 4'); > myblurb=myblurb.replace('Forwards, backwards 4', 'Forwards, backwards, up, down, diagonal 4'); 309,310c281 < anames[0]=nameslist.split(',')[0].trim(); < fnames[0]='' + nameslist.split(',')[0].trim() + ''; --- > anames[0]=nameslist.split(',')[0].trim(); 313,322d283 < } else { < document.getElementById('names').placeholder='Player1,Player2'; < anames[0]='Player1'; < fnames[0]='Player1'; < anames.push('Player2'); < fnames.push('Player2'); < ascores.push(0); < agoes.push(0); < nameslist='Player1,Player2'; < document.getElementById('numsel').value='2'; 325,346d285 < < function bc(e) { < e = e || window.event; < e.preventDefault(); < < if (e.touches) { < if (e.touches[0].pageX) { < xx = e.touches[0].pageX; < yy = e.touches[0].pageY; < } else { < xx = e.touches[0].clientX; < yy = e.touches[0].clientY; < } < //console.log('pos3=' + pos3 + ',pos4=' + pos4); < } else if (e.clientX || e.clientY) { < xx = e.clientX; < yy = e.clientY; < } else { < xx = e.pageX; < yy = e.pageY; < } < } 348,496c287 < function didclick(e, spano) { < if (document.getElementById('names')) { < if (document.getElementById('names').value == '' && document.getElementById('names').placeholder.indexOf(',') != -1) { < document.getElementById('names').value=document.getElementById('names').placeholder; < //alert(1); < document.getElementById('numsel').value='' + document.getElementById('names').value.split(',').length; < //alert(document.getElementById('numsel').value); < nparrange(document.getElementById('numsel')); < //alert(11); < document.getElementById('smore').innerHTML=notify('Your go ' + anames[curplayer]); < } < } < console.log('1'); < if (spano.innerHTML.toLowerCase() == 's' || spano.innerHTML.toLowerCase() == 'o') { return true; } < console.log('2'); < var rtis=spano.getBoundingClientRect(); < console.log('3'); < e = e || window.event; < e.preventDefault(); < < if (e.touches) { < if (e.touches[0].pageX) { < xx = e.touches[0].pageX; < yy = e.touches[0].pageY; < } else { < xx = e.touches[0].clientX; < yy = e.touches[0].clientY; < } < //console.log('pos3=' + pos3 + ',pos4=' + pos4); < } else if (e.clientX || e.clientY) { < xx = e.clientX; < yy = e.clientY; < } else { < xx = e.pageX; < yy = e.pageY; < } < < var thislet=' '; < var locsubscore=0; < var thisi=eval(spano.id.replace('span','')); < if (eval(yy - rtis.top) <= eval(rtis.bottom - yy)) { // s < thislet='S'; < spano.innerHTML=thislet; < spano.style.color='rgb(128,0,128)'; //'#000000'; < } else { < thislet='O'; < spano.innerHTML=thislet; < spano.style.color='#0000ff'; < } < sbs=[]; < if (eval(thisi % 100) >= 2) { // forwards we are at end < if ((sb(document.getElementById('span' + eval(-2 + thisi))).innerHTML + sb(document.getElementById('span' + eval(-1 + thisi))).innerHTML + sb(document.getElementById('span' + eval(thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < } < sbs=[]; < if (eval(thisi % 100) >= 1 && eval(thisi % 100) <= 98) { // forwards we are in the middle < if ((sb(document.getElementById('span' + eval(-1 + thisi))).innerHTML + sb(document.getElementById('span' + eval(thisi))).innerHTML + sb(document.getElementById('span' + eval(1 + thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < } < sbs=[]; < if (eval(thisi % 100) <= 97) { // forwards we are at start < if ((sb(document.getElementById('span' + eval(thisi))).innerHTML + sb(document.getElementById('span' + eval(1 + thisi))).innerHTML + sb(document.getElementById('span' + eval(2 + thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < } < < if (updownallowed) { < sbs=[]; < if (eval(thisi / 100) >= 2) { // down we are at end < if ((sb(document.getElementById('span' + eval(-200 + thisi))).innerHTML + sb(document.getElementById('span' + eval(-100 + thisi))).innerHTML + sb(document.getElementById('span' + eval(thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < } < sbs=[]; < if (eval(thisi / 100) >= 1 && eval(thisi / 100) <= 18) { // down we are in the middle < if ((sb(document.getElementById('span' + eval(-100 + thisi))).innerHTML + sb(document.getElementById('span' + eval(thisi))).innerHTML + sb(document.getElementById('span' + eval(100 + thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < } < sbs=[]; < if (eval(thisi / 100) <= 17) { // down we are at start < if ((sb(document.getElementById('span' + eval(thisi))).innerHTML + sb(document.getElementById('span' + eval(100 + thisi))).innerHTML + sb(document.getElementById('span' + eval(200 + thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < } < } < < if (diagonalsallowed) { < sbs=[]; < if (eval(thisi / 100) >= 2 && eval(thisi % 100) >= 2) { // diagonally we are at end < if ((sb(document.getElementById('span' + eval(-202 + thisi))).innerHTML + sb(document.getElementById('span' + eval(-101 + thisi))).innerHTML + sb(document.getElementById('span' + eval(thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < sbs=[]; < if ((sb(document.getElementById('span' + eval(-198 + thisi))).innerHTML + sb(document.getElementById('span' + eval(-99 + thisi))).innerHTML + sb(document.getElementById('span' + eval(thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < } < sbs=[]; < if (eval(thisi / 100) >= 1 && eval(thisi / 100) <= 18 && eval(thisi % 100) >= 1 && eval(thisi % 100) <= 98) { // diagonally we are in the middle < if ((sb(document.getElementById('span' + eval(-101 + thisi))).innerHTML + sb(document.getElementById('span' + eval(thisi))).innerHTML + sb(document.getElementById('span' + eval(101 + thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < sbs=[]; < if ((sb(document.getElementById('span' + eval(-99 + thisi))).innerHTML + sb(document.getElementById('span' + eval(thisi))).innerHTML + sb(document.getElementById('span' + eval(99 + thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < } < sbs=[]; < if (eval(thisi / 100) <= 17 && eval(thisi % 100) <= 97) { // diagonally we are at start < if ((sb(document.getElementById('span' + eval(thisi))).innerHTML + sb(document.getElementById('span' + eval(101 + thisi))).innerHTML + sb(document.getElementById('span' + eval(202 + thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < sbs=[]; < if ((sb(document.getElementById('span' + eval(thisi))).innerHTML + sb(document.getElementById('span' + eval(99 + thisi))).innerHTML + sb(document.getElementById('span' + eval(198 + thisi))).innerHTML) == 'SOS') { < sbord(); < locsubscore++; < } < } < } < sbs=[]; < < < if (locsubscore > 0) { < //alert('locsubscore=' + locsubscore + ' yy=' + yy + ' rtis.top=' + rtis.top + ' rtis.y=' + rtis.y + ' rtis.bottom=' + rtis.bottom); < changeu=false; < subscore=locsubscore; < return cscore('pointer', locsubscore); < } else { < subscore=0; < changeu=true; < //alert('change'); < return cscore('pointer', 0); < } < < --- > function didclick(spano) { 507c298 < if (wlen == 3) { // >= 4) { --- > if (wlen >= 4) { 541c332 < if (wlen == 3) { // >= 4) { --- > if (wlen >= 4) { 585c376 < if (wlen == 3) { // >= 4) { --- > if (wlen >= 4) { 659c450 < return ablurb.replace(' ' + anames[curplayer], ' ' + fnames[curplayer]).replace(' ' + anames[sparecurplayer], ' ' + fnames[sparecurplayer]); --- > return ablurb; 663,669c454 < if (eval('' + sio.value) > eval('' + ascores.length) || 1 == 1) { //numplayers != eval('' + sio.value)) { < if (eval('' + sio.value) >= 2 && eval('' + ascores.length) >= 2) { < ascores=[ascores[0]]; < agoes=[agoes[0]]; < anames=[anames[0]]; < fnames=[fnames[0]]; < } --- > if (eval('' + sio.value) > eval('' + ascores.length)) { 674d458 < fnames.push('' + nameslist.split(',')[eval(-1 + ascores.length)] + ''); 677d460 < fnames[0]=('' + nameslist.trim().split(',')[0] + ''); 680d462 < fnames.push('' + nameslist.split(' ')[eval(-1 + ascores.length)] + ''); 683d464 < fnames[0]=('' + nameslist.trim().split(' ')[0] + ''); 686d466 < fnames.push('Player ' + ascores.length + ''); 733c513 < myblurb=myblurb.replace(' letters', ' more common set of letters'); --- > myblurb=myblurb.replace(' letters ', ' more common set of letters '); 753c533 < myblurb=myblurb.replace('Forwards 3', 'Forwards, backwards 3'); --- > myblurb=myblurb.replace('Forwards 4', 'Forwards, backwards 4'); 759,760c539,540 < myblurb=myblurb.replace('Forwards 3', 'Forwards, backwards, up, down, diagonal 3'); < myblurb=myblurb.replace('Forwards, backwards 3', 'Forwards, backwards, up, down, diagonal 3'); --- > myblurb=myblurb.replace('Forwards 4', 'Forwards, backwards, up, down, diagonal 4'); > myblurb=myblurb.replace('Forwards, backwards 4', 'Forwards, backwards, up, down, diagonal 4'); 777c557 < wdebye+=' '; --- > wdebye+='' + aletter + ''; 811,818d590 < function sback(spo) { < //var rstis=spo.getBoundingClientRect(); < //spo.style.backgroundImage='url("data:image/svg+xml;utf8,SO");'; < //spo.style.backgroundRepeat='no-repeat'; < //spo.style.backgroundSize='contain'; < //spo.style.cursor='url("data:image/svg+xml;utf8,SO") 16 0, progress'; < } < 897c669 < document.getElementById('mytao').style.cursor='pointer'; //cscore('pointer', subscore); --- > document.getElementById('mytao').style.cursor=cscore('pointer', subscore); 924,926c696,697 < sparecurplayer=curplayer; < if ((lastzdebye != zdebye && lastzdebye != zzdebye) || 9 == 9) { < if (ssc != 0 || 1 == 1) { goes++; } --- > if (lastzdebye != zdebye && lastzdebye != zzdebye) { > if (ssc != 0) { goes++; } 987c758 < // return 'pointer'; // '' --- > return 'pointer'; // '' 1012,1013c783 < if (ssc == 0 && changeu) { curplayer++; } < changeu=false; --- > curplayer++; 1015c785 < if (document.getElementById('smore').innerHTML != '' && document.getElementById('smore').innerHTML.replace(/\ if (document.getElementById('smore').innerHTML != '' && document.getElementById('smore').innerHTML.indexOf('<') == -1) { 1031c801 < if ((8 == 8 || subscore != 0) && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { --- > if (subscore != 0 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { 1038d807 < subscore=0; 1043c812 < if ((8 == 8 || subscore != 0) && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { --- > if (subscore != 0 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { 1081c850 < document.getElementById('mytao').style.cursor='pointer'; //cscore('pointer', subscore); --- > document.getElementById('mytao').style.cursor=cscore('pointer', subscore); 1096c865 < document.getElementById('mytao').style.cursor='pointer'; //cscore('pointer', Math.abs(subscore)); --- > document.getElementById('mytao').style.cursor=cscore('pointer', Math.abs(subscore)); 1107c876 < document.getElementById('mytao').style.cursor='pointer'; //cscore('pointer', Math.abs(subscore)); --- > document.getElementById('mytao').style.cursor=cscore('pointer', Math.abs(subscore)); 1132c901 < document.getElementById('mytao').style.cursor='pointer'; //cscore('pointer', subscore); --- > document.getElementById('mytao').style.cursor=cscore('pointer', subscore); 1137c906 < document.getElementById('mytao').style.cursor='pointer'; //cscore('pointer', subscore); --- > document.getElementById('mytao').style.cursor=cscore('pointer', subscore); 1150c919 < document.getElementById('mytao').style.cursor='pointer'; //cscore('pointer', subscore); --- > document.getElementById('mytao').style.cursor=cscore('pointer', subscore); 1185c954 < if (eval('' + linesare.length) == 1 && eval('' + dummymc(outstris).length) == 3) { // >= 4) { --- > if (eval('' + linesare.length) == 1 && eval('' + dummymc(outstris).length) >= 4) { 1192,1193c961,962 < if (eval('' + linesare.length) != 3 && eval('' + linesare.length) > 1) { < notify('Sorry, but word is not the correct length.'); --- > if (eval('' + linesare.length) <= 3 && eval('' + linesare.length) > 1) { > notify('Sorry, but word is too short.'); 1195c964 < if (eval('' + linesare.length) == 3) { --- > if (eval('' + linesare.length) > 3) { 1316c1085 < if (eval('' + mc(documentgetSelectiontoString).length) == 3) { // >= 4) { --- > if (eval('' + mc(documentgetSelectiontoString).length) >= 4) { 1354c1123 < if (eval('' + mc(documentgetSelectiontoString).length) == 3) { // >= 4) { --- > if (eval('' + mc(documentgetSelectiontoString).length) >= 4) { 1396c1165 < document.getElementById('mytao').style.cursor='pointer'; //cscore('pointer', subscore); --- > document.getElementById('mytao').style.cursor=cscore('pointer', subscore); 1443,1444c1212 < //alert('what=' + what + ' to=' + what.replace(' ' + anames[curplayer], ' ' + fnames[curplayer])); < return what.replace(' ' + anames[curplayer], ' ' + fnames[curplayer]).replace(' ' + anames[sparecurplayer], ' ' + fnames[sparecurplayer]); --- > return what;