3c3 < Emoji Sequence - RJM Programming - March, 2023 ... thanks to Dr Crypton's Mind Benders Introduction by Isaac Asimov --- > Number Sequence - RJM Programming - March, 2023 ... thanks to Dr Crypton's Mind Benders Introduction by Isaac Asimov 6c6 < td { text-align: center; background-color: #e0f0d0; font-size: 36px; } --- > td { text-align: center; background-color: #f0f0f0; } 20c20 < var gd='', ogd=''; --- > var gd=''; 22,36d21 < < if (!String.fromCodePoint) { // thanks to http://xahlee.info/js/js_unicode_code_point.html < // ES6 Unicode Shims 0.1 , © 2012 Steven Levithan , MIT License < String.fromCodePoint = function fromCodePoint () { < var chars = [], point, offset, units, i; < for (i = 0; i < arguments.length; ++i) { < point = arguments[i]; < offset = point - 0x10000; < units = point > 0xFFFF ? [0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)] : [point]; < chars.push(String.fromCharCode.apply(null, units)); < } < return chars.join(""); < } < } < 39,40c24 < var suffix='', totallynum=true, totallyhex=true, it=0; < if (document.getElementById('mynum').value == ' ') { return ''; } --- > var suffix=''; 43c27 < if (gd == document.getElementById('mynum').value.replace('&#x','').replace('&#','').replace("\\".substring(0,1) + 'u','').replace(';','').replace('0x','').trim() || ogd == document.getElementById('mynum').value.trim()) { --- > if (gd == document.getElementById('mynum').value) { 46c30 < suffix=' ... Well done on guessing the emoji ' + ogd; --- > suffix=' ... Well done!'; 48,52c32 < if (1 == 1) { < document.getElementById('myh3').innerHTML='Well done goessing that ' + ogd + ' was your emoji in sequence! But just in case it was a fluke ...'; < } else { < alert('Well done goessing that ' + ogd + ' was your emoji in sequence! But just in case it was a fluke ...'); < } --- > alert('Well done! But just in case it was a fluke ...'); 59,78d38 < } else if (document.getElementById('mynum').value.trim() != '') { < while (it < document.getElementById('mynum').value.replace('&#x','').replace('&#','').replace("\\".substring(0,1) + 'u','').replace(';','').replace('0x','').trim().length) { < if (document.getElementById('mynum').value.replace('&#x','').replace('&#','').replace("\\".substring(0,1) + 'u','').replace(';','').replace('0x','').trim().substring(it).substring(0,1) < '0' || document.getElementById('mynum').value.replace('&#x','').replace('&#','').replace("\\".substring(0,1) + 'u','').replace(';','').replace('0x','').trim().substring(it).substring(0,1) > '9') { < totallynum=false; < if (document.getElementById('mynum').value.replace('&#x','').replace('&#','').replace("\\".substring(0,1) + 'u','').replace(';','').replace('0x','').trim().substring(it).toLowerCase() < 'a' || document.getElementById('mynum').value.replace('&#x','').replace('&#','').replace("\\".substring(0,1) + 'u','').replace(';','').replace('0x','').trim().substring(it).substring(0,1).toLowerCase() > 'f') { < totallyhex=false; < } < } < it++; < } < if (totallynum || totallyhex) { < if (!totallynum || document.getElementById('mynum').value.indexOf("\\".substring(0,1) + 'u') != -1 || document.getElementById('mynum').value.indexOf('0x') != -1 || document.getElementById('mynum').value.indexOf('&#x') != -1) { < suffix=' ... No, it is not your ' + String.fromCodePoint(parseInt(document.getElementById('mynum').value.replace('&#x','').replace('&#','').replace("\\".substring(0,1) + 'u','').replace(';','').replace('0x','').trim()),16) + ' emoji guess.'; < } else { < suffix=' ... No, it is not your ' + String.fromCodePoint(document.getElementById('mynum').value.replace('&#x','').replace('&#','').replace("\\".substring(0,1) + 'u','').replace(';','').replace('0x','').trim()) + ' emoji guess.'; < } < } else { < suffix=' ... No, it is not your ' + document.getElementById('mynum').value.trim() + ' emoji guess.'; < } < document.getElementById('score').innerHTML='Score: ' + score + '/' + goes + suffix + ''; 80c40 < suffix=' ... No, it is not your emoji guess.'; --- > suffix=' ... No, it is not that number.'; 83c43 < document.getElementById('mynum').value=' '; --- > document.getElementById('mynum').value='0'; 98d57 < var dinlet=10; 102c61 < while (Math.pow(dinlet, iz) < eval(inlet + inih)) { --- > while (Math.pow(inlet, iz) < inih) { 110c69 < if (Math.pow(dinlet, iiz) > eval(inlet + inih)) { --- > if (Math.pow(inlet, iiz) > inih) { 112c71 < } else if (Math.pow(dinlet, iiz) == eval(inlet + inih)) { --- > } else if (Math.pow(inlet, iiz) == inih) { 114c73 < inih-=Math.pow(dinlet, iiz) --- > inih-=Math.pow(inlet, iiz) 118c77 < while (eval(aone * Math.pow(dinlet, iiz)) <= eval(inlet + inih)) { --- > while (eval(aone * Math.pow(inlet, iiz)) <= inih) { 124c83 < inih-=eval(aone * Math.pow(dinlet, iiz)); --- > inih-=eval(aone * Math.pow(inlet, iiz)); 159c118 < ih=Math.max(53,Math.floor(Math.random() * 29987)); --- > ih=Math.max(33,Math.floor(Math.random() * 9987)); 168c127 < document.getElementById('thefour').innerHTML+='' + String.fromCodePoint(numberih(ih, startnum)) + ''; --- > document.getElementById('thefour').innerHTML+='' + numberih(ih, startnum) + ''; 170c129 < document.getElementById('thefour').innerHTML+='' + String.fromCodePoint(numberih(ih, startnum)) + ''; --- > document.getElementById('thefour').innerHTML+='' + numberih(ih, startnum) + ''; 173c132 < document.getElementById('thefour').innerHTML+='' + String.fromCodePoint(numberih(ih, startnum)) + ''; --- > document.getElementById('thefour').innerHTML+='' + numberih(ih, startnum) + ''; 176c135 < document.getElementById('thefour').innerHTML+='' + String.fromCodePoint(numberih(ih, startnum)) + ''; --- > document.getElementById('thefour').innerHTML+='' + numberih(ih, startnum) + ''; 181c140 < ih=Math.max(53,Math.floor(Math.random() * 29987)); --- > ih=Math.max(33,Math.floor(Math.random() * 9987)); 185c144 < document.getElementById('thefour').innerHTML+='' + String.fromCodePoint(numberih(ih, startnum)) + ''; --- > document.getElementById('thefour').innerHTML+='' + numberih(ih, startnum) + ''; 187c146 < document.getElementById('thefour').innerHTML+='' + String.fromCodePoint(numberih(ih, startnum)) + ''; --- > document.getElementById('thefour').innerHTML+='' + numberih(ih, startnum) + ''; 190c149 < document.getElementById('thefour').innerHTML+='' + String.fromCodePoint(numberih(ih, startnum)) + ''; --- > document.getElementById('thefour').innerHTML+='' + numberih(ih, startnum) + ''; 193c152 < document.getElementById('thefour').innerHTML+='' + String.fromCodePoint(numberih(ih, startnum)) + ''; --- > document.getElementById('thefour').innerHTML+='' + numberih(ih, startnum) + ''; 198d156 < ogd=String.fromCodePoint(gd); 215c173 < document.getElementById('aemail').href='mailto:' + emailn + '?subject=Emoji%20Sequence%20Game&' + document.getElementById('aemail').href.split(':')[1].split('&')[1].split('%3D')[0] + '%3D' + pluss; --- > document.getElementById('aemail').href='mailto:' + emailn + '?subject=Number%20Sequence%20Game&' + document.getElementById('aemail').href.split(':')[1].split('&')[1].split('%3D')[0] + '%3D' + pluss; 224,225c182,183 <

Emoji Sequence Game   📧 📟

<

RJM Programming - March, 2023

--- >

Number Sequence Game   📧 📟

>

RJM Programming - March, 2023

234c192 <

Next Emoji in Sequence:    

--- >

Next Number in Sequence:    

238,240c196,198 < To determine the emoji there is a constant number and a changing number involved in determining it ... ... < < --- > To determine the number there is a constant number and a changing number involved in determining it ... ... > > 242c200 < --- >