<html>
<head>
<title>0/0 is User Score/Goes ... up to 52 players can take it in turns with our Numbers Quiz</title>
<style>
html { background-color: yellow; }
</style>
<script type='text/javascript'>
var fi=null;
var ij=0, ji=-1, kl='', kq=-1;
var donelist=[], oplist=[];
var oleft=100, thisleft=100;
var otop=100, thistop=100;
var uis='';
var overallgoes=0, overallscore=0;
var numplayers=1, curplayer=1, lastcurplayer=1;
var lastgoes=[0], lastscore=[0];
var clastgoes='0', clastscore='0';
var theblurb='', wblurb='';
var thirteen=4; //13;
var four=13; //4;
var lastdts0='';
// Thanks to https://www.fileformat.info/info/unicode/block/playing_cards/list.htm
var spcps=["127137/images/01s.gif",
"127138/images/02s.gif",
"127139/images/03s.gif",
"127140/images/04s.gif",
"127141/images/05s.gif",
"127142/images/06s.gif",
"127143/images/07s.gif",
"127144/images/08s.gif",
"127145/images/09s.gif",
"127146/images/10s.gif",
"127147/images/11s.gif",
"127149/images/12s.gif",
"127150/images/13s.gif",
"127153/images/01h.gif",
"127154/images/02h.gif",
"127155/images/03h.gif",
"127156/images/04h.gif",
"127157/images/05h.gif",
"127158/images/06h.gif",
"127159/images/07h.gif",
"127160/images/08h.gif",
"127161/images/09h.gif",
"127162/images/10h.gif",
"127163/images/11h.gif",
"127165/images/12h.gif",
"127166/images/13h.gif",
"127169/images/01d.gif",
"127170/images/02d.gif",
"127171/images/03d.gif",
"127172/images/04d.gif",
"127173/images/05d.gif",
"127174/images/06d.gif",
"127175/images/07d.gif",
"127176/images/08d.gif",
"127177/images/09d.gif",
"127178/images/10d.gif",
"127179/images/11d.gif",
"127181/images/12d.gif",
"127182/images/13d.gif",
"127185/images/01c.gif",
"127186/images/02c.gif",
"127187/images/03c.gif",
"127188/images/04c.gif",
"127189/images/05c.gif",
"127190/images/06c.gif",
"127191/images/07c.gif",
"127192/images/08c.gif",
"127193/images/09c.gif",
"127194/images/10c.gif",
"127195/images/11c.gif",
"127197/images/12c.gif",
"127198/images/13c.gif"];
var cards=["//www.rjmprogramming.com.au/images/01s.gif",
"//www.rjmprogramming.com.au/images/02s.gif",
"//www.rjmprogramming.com.au/images/03s.gif",
"//www.rjmprogramming.com.au/images/04s.gif",
"//www.rjmprogramming.com.au/images/05s.gif",
"//www.rjmprogramming.com.au/images/06s.gif",
"//www.rjmprogramming.com.au/images/07s.gif",
"//www.rjmprogramming.com.au/images/08s.gif",
"//www.rjmprogramming.com.au/images/09s.gif",
"//www.rjmprogramming.com.au/images/10s.gif",
"//www.rjmprogramming.com.au/images/11s.gif",
"//www.rjmprogramming.com.au/images/12s.gif",
"//www.rjmprogramming.com.au/images/13s.gif",
"//www.rjmprogramming.com.au/images/01h.gif",
"//www.rjmprogramming.com.au/images/02h.gif",
"//www.rjmprogramming.com.au/images/03h.gif",
"//www.rjmprogramming.com.au/images/04h.gif",
"//www.rjmprogramming.com.au/images/05h.gif",
"//www.rjmprogramming.com.au/images/06h.gif",
"//www.rjmprogramming.com.au/images/07h.gif",
"//www.rjmprogramming.com.au/images/08h.gif",
"//www.rjmprogramming.com.au/images/09h.gif",
"//www.rjmprogramming.com.au/images/10h.gif",
"//www.rjmprogramming.com.au/images/11h.gif",
"//www.rjmprogramming.com.au/images/12h.gif",
"//www.rjmprogramming.com.au/images/13h.gif",
"//www.rjmprogramming.com.au/images/01d.gif",
"//www.rjmprogramming.com.au/images/02d.gif",
"//www.rjmprogramming.com.au/images/03d.gif",
"//www.rjmprogramming.com.au/images/04d.gif",
"//www.rjmprogramming.com.au/images/05d.gif",
"//www.rjmprogramming.com.au/images/06d.gif",
"//www.rjmprogramming.com.au/images/07d.gif",
"//www.rjmprogramming.com.au/images/08d.gif",
"//www.rjmprogramming.com.au/images/09d.gif",
"//www.rjmprogramming.com.au/images/10d.gif",
"//www.rjmprogramming.com.au/images/11d.gif",
"//www.rjmprogramming.com.au/images/12d.gif",
"//www.rjmprogramming.com.au/images/13d.gif",
"//www.rjmprogramming.com.au/images/01c.gif",
"//www.rjmprogramming.com.au/images/02c.gif",
"//www.rjmprogramming.com.au/images/03c.gif",
"//www.rjmprogramming.com.au/images/04c.gif",
"//www.rjmprogramming.com.au/images/05c.gif",
"//www.rjmprogramming.com.au/images/06c.gif",
"//www.rjmprogramming.com.au/images/07c.gif",
"//www.rjmprogramming.com.au/images/08c.gif",
"//www.rjmprogramming.com.au/images/09c.gif",
"//www.rjmprogramming.com.au/images/10c.gif",
"//www.rjmprogramming.com.au/images/11c.gif",
"//www.rjmprogramming.com.au/images/12c.gif",
"//www.rjmprogramming.com.au/images/13c.gif"];
var sq=["Is the additive identity.",
"Is the multiplicative identity.",
"Is the only even prime.",
"Is the number of spatial dimensions we live in.",
"Is the smallest number of colours sufficient to colour all planar maps.",
"Is the number of Platonic solids.",
"Is the smallest perfect number.",
"Is the smallest number of sides of a regular polygon that is not constructible by straightedge and compass.",
"Is the largest cube in the Fibonacci sequence.",
"Is the maximum number of cubes that are needed to sum to any positive integer.",
"Is the base of our number system.",
"Is the largest known multiplicative persistence.",
"Is the smallest abundant number.",
"Is the number of Archimedian solids.",
"Is the smallest even number n with no solutions to phi(m) = n.",
"Is the smallest composite number n with the property that there is only one group of order n.",
"Is the only number of the form xy = yx with x and y being different integers.",
"Is the number of wallpaper groups.",
"Is the only positive number that is twice the sum of its digits.",
"Is the maximum number of 4th powers needed to sum to any number.",
"Is the number of rooted trees with 6 vertices.",
"Is the smallest number of distinct squares needed to tile a square.",
"Is the number of partitions of 8.",
"Is the smallest number of integer-sided boxes that tile a box so that no two boxes share a common length.",
"Is the largest number divisible by all numbers less than its square root.",
"Is the smallest square that can be written as a sum of 2 squares."];
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("");
}
}
if (document.URL.indexOf('spcp=') == -1) {
kq='' + Math.floor(Math.random() * sq.length);
document.title='0/0 is User Score/Goes ... up to 52 players can take it in turns with our Numbers Quiz';
kl='' + Math.floor(Math.random() * spcps.length);
donelist.push('' + kl);
uis=document.URL.split('#')[0].split('?')[0] + '?spcp=' + spcps[eval('' + donelist[0])].split('/')[0];
console.log("oplist.push(window.open('" + uis + "', '_blank', 'left=" + thisleft + ",top=" + thistop + ",width=20,height=20'))");
eval("oplist.push(window.open('" + uis + "', '_blank', 'left=" + thisleft + ",top=" + thistop + ",width=20,height=20'))");
oplist[eval(-1 + oplist.length)].document.write("<link rel=icon href=" + cards[kl] + "><scr" + "ipt type='text/javascript'> var da='" + eval(0 + kq) + "'; var dp='Given answer is integer from 0 to 25 ... " + sq[kq] + "'; var def=String.fromCodePoint(" + spcps[eval('' + kl)].split('/')[0] + "); function checka(tpa) { var os=''; var ps=eval(window.opener.document.title.split('/')[0].trim()); var pg=eval(window.opener.document.title.split('/')[1].split(' ')[0]); if (tpa.trim() == da) { ps++; os=tpa.split(da)[1]; } else { pg++; os=tpa.split(tpa.trim())[1]; } window.opener.document.title=ps + os + '/' + pg + ' is User Score/Goes'; window.close(); } function pa() { if (document.hasFocus()) { var hj=prompt(dp + window.opener.blurb(), def); if (hj == null) { hj=''; } if (hj.replace(def,'') == '') { setTimeout(pa,1000); } else { checka(hj); } } else { setTimeout(pa,1000); } } pa(); </scr" + "ipt>");
oplist[eval(-1 + oplist.length)].document.title=String.fromCodePoint(eval(spcps[eval('' + donelist[0])].split('/')[0]));
dothis('' + donelist[0]);
for (var ijk=1; ijk<spcps.length; ijk++) {
kq='' + Math.floor(Math.random() * sq.length);
kl='' + Math.floor(Math.random() * spcps.length);
while (donelist.indexOf(kl) != -1) {
kl='' + Math.floor(Math.random() * spcps.length);
}
donelist.push(kl);
if (eval(ijk % eval(2 * thirteen)) == 0) {
thisleft=oleft;
thistop+=eval(eval(screen.height - 100) / eval(four / 1.5)); // four
} else {
thisleft+=eval(eval(screen.width - 100) / eval(2 + eval(2 * thirteen))); // thirteen
}
uis=document.URL.split('#')[0].split('?')[0] + '?spcp=' + spcps[eval('' + kl)].split('/')[0];
console.log("oplist.push(window.open('" + uis + "', '_blank', 'left=" + thisleft + ",top=" + thistop + ",width=20,height=20'))");
eval("oplist.push(window.open('" + uis + "', '_blank', 'left=" + thisleft + ",top=" + thistop + ",width=20,height=20'))");
oplist[eval(-1 + oplist.length)].document.write("<link rel=icon href=" + cards[kl] + "><scr" + "ipt type='text/javascript'> var da='" + eval(0 + kq) + "'; var dp='Given answer is integer from 0 to 25 ... " + sq[kq] + "'; var def=String.fromCodePoint(" + spcps[eval('' + kl)].split('/')[0] + "); function checka(tpa) { var os=''; var ps=eval(window.opener.document.title.split('/')[0].trim()); var pg=eval(window.opener.document.title.split('/')[1].split(' ')[0]); if (tpa.trim() == da) { ps++; os=tpa.split(da)[1]; } else { pg++; os=tpa.split(tpa.trim())[1]; } window.opener.document.title=ps + os + '/' + pg + ' is User Score/Goes'; window.close(); } function pa() { if (document.hasFocus()) { var hj=prompt(dp + window.opener.blurb(), def); if (hj == null) { hj=''; } if (hj.replace(def,'') == '') { setTimeout(pa,1000); } else { checka(hj); } } else { setTimeout(pa,1000); } } pa(); </scr" + "ipt>");
oplist[eval(-1 + oplist.length)].document.title=String.fromCodePoint(eval(spcps[eval('' + kl)].split('/')[0]));
}
document.title='0/0 is User Score/Goes ... up to 52 players can take it in turns with our Numbers Quiz';
setInterval(examinescore, 200);
} else {
dothis((location.search.split('spcp=')[1] ? location.search.split('spcp=')[1].split('&')[0] : '127166'));
if (1 == 6) {
document.title=String.fromCodePoint(eval(location.search.split('spcp=')[1] ? location.search.split('spcp=')[1].split('&')[0] : '127166')); //'🂾';
for (ij=0; ij<spcps.length; ij++) {
if (spcps[ij].indexOf('' + eval(location.search.split('spcp=')[1] ? location.search.split('spcp=')[1].split('&')[0] : '127166')) == 0) {
ji=ij;
}
}
if (ji >= 0) {
fi=document.createElement('link');
fi.rel='icon';
fi.href=cards[ji];
document.head.appendChild(fi);
}
}
}
function blurb() {
if (wblurb == ' Hello Player 1' && theblurb == ' If you are player 2 rather than player 1 append space to your answer.') {
theblurb='';
wblurb='';
}
return theblurb + wblurb;
}
function getnum() {
return numplayers;
}
function examinescore() {
var zs='';
var dolater=false;
var incscore=0; incgoes=1;
var dts=document.title.split('/');
if (document.title.indexOf(':') == -1) {
dts[1]=dts[1].split(' ')[0];
if (wblurb == ' Hello Player 1' && theblurb == ' If you are player 2 rather than player 1 append space to your answer.') {
theblurb='';
wblurb='';
curplayer=1;
}
if (overallgoes == 2 && numplayers == 1) {
theblurb='';
wblurb='';
curplayer=1;
}
if (overallgoes == 2 && dts[0].indexOf(' ') == -1 && theblurb == ' If you are player 2 rather than player 1 append space to your answer.') {
theblurb='';
wblurb='';
curplayer=1;
}
if (dts[0] != clastscore) { // || dts[1] != clastgoes) {
overallgoes++; // 4 numplayers is 2
if (theblurb != '' && dts[0].indexOf(' ') == -1) {
curplayer=1;
wblurb=' Hello Player ' + eval(1 + eval(overallgoes % numplayers)) + '.'; // + zs;
theblurb='';
dolater=true; //lastgoes[0]++;
} else if (dts[0].indexOf(' ') == -1 && eval(overallgoes % numplayers) == 1 && numplayers != 1) {
curplayer=1;
dolater=true; //lastgoes[0]++;
}
if (1 == 1) { //dts[0].trim() != ('' + lastscore[eval(-1 + curplayer)])) {
if (dts[0].trim() != lastdts0.trim()) { incscore++; }
//if (dts[0].indexOf(' ') == -1 && dts[0].trim() != lastdts0.trim()) { lastscore[eval(-1 + curplayer)]+=incscore; }
//if (dts[0].indexOf(' ') == -1 && dts[0].trim() != lastdts0.trim()) { lastscore[eval(-1 + lastcurplayer)]+=incscore; }
if (dts[0].indexOf(' ') == -1 && dts[0].trim() != lastdts0.trim()) { lastscore[eval(eval(-1 + overallgoes) % numplayers)]+=incscore; }
if (curplayer != 1 && 1 == 7) { lastgoes[eval(numplayers - 1 + eval(overallgoes % numplayers))]++; }
if (dts[0].trim() != lastdts0.trim()) { overallscore++; }
} else {
if (curplayer != 1 && 1 == 7) { lastgoes[eval(numplayers - 1 + eval(overallgoes % numplayers))]++; }
}
if (dts[0].indexOf(' ') != -1) {
numplayers++;
lastscore.push(incscore);
curplayer=numplayers; //eval(1 + eval(overallgoes % numplayers));
if (curplayer == 1 && eval(1 + eval(overallgoes % numplayers)) == 1) {
lastgoes.push(eval(1 + lastgoes[0]));
} else {
lastgoes.push(lastgoes[0]);
}
theblurb=' If you are player ' + eval(1 + numplayers) + ' rather than player 1 append space to your answer.'; // + zs;
} else if (numplayers == 1 && overallgoes == 1) {
theblurb=' If you are player 2 rather than player 1 append space to your answer.'; // + zs;
} else if (numplayers == 1 && overallgoes > 1) {
theblurb=''; //' If you are player 2 rather than player 1 append space to your answer.'; // + zs;
} else if (theblurb != '') {
theblurb=' If you are player ' + eval(1 + numplayers) + ' rather than player 1 append space to your answer.'; // + zs;
curplayer=eval(0 + eval(overallgoes % numplayers)); // ?
if (eval(1 + eval(overallgoes % numplayers)) == 1) {
lastgoes[eval(-1 + numplayers)]=lastgoes[0];
}
if (numplayers != 1) { wblurb=' Hello Player ' + eval(1 + eval(overallgoes % numplayers)) + '.'; } // + zs;
theblurb='';
} else {
curplayer=eval(1 + eval(overallgoes % numplayers));
if (numplayers != 1) { wblurb=' Hello Player ' + eval(1 + eval(overallgoes % numplayers)) + '.'; } // + zs;
theblurb='';
}
if (curplayer == 1) { // && eval(1 + eval(overallgoes % numplayers)) == 1) {
//zs='!';
lastgoes[0]++;
dolater=false;
}
if (overallgoes == 2 && dts[0].indexOf(' ') == -1 && theblurb == ' If you are player 2 rather than player 1 append space to your answer.') {
theblurb='';
wblurb='';
curplayer=1;
}
lastdts0=dts[0].trim();
lastcurplayer=curplayer;
} else if (dts[1] != clastgoes) {
overallgoes++;
if (curplayer != 1 && 1 == 7) { lastgoes[eval(numplayers - 1 + eval(overallgoes % numplayers))]++; }
if (numplayers != 1) {
curplayer=eval(0 + eval(overallgoes % numplayers));
if (eval(1 + eval(overallgoes % numplayers)) == 1) {
lastgoes[eval(-1 + numplayers)]=lastgoes[0];
}
if (numplayers != 1) { wblurb=' Hello Player ' + eval(1 + eval(overallgoes % numplayers)) + '.'; } // + zs;
theblurb='';
} else if (numplayers == 1 && overallgoes == 1) {
theblurb=' If you are player 2 rather than player 1 append space to your answer.'; // + zs;
} else if (numplayers == 1 && overallgoes > 1) {
theblurb=''; //' If you are player 2 rather than player 1 append space to your answer.'; // + zs;
}
if (curplayer == 1) { // && eval(1 + eval(overallgoes % numplayers)) == 1) {
//zs='%';
lastgoes[0]++;
dolater=false;
}
lastdts0=dts[0].trim();
lastcurplayer=curplayer;
}
clastscore=dts[0].trim();
clastgoes=dts[1].trim();
// 4/4 2:2/3:3
if (numplayers != 1) {
var cd=overallgoes;
for (var qqiuy=0; qqiuy<numplayers; qqiuy++) {
lastgoes[qqiuy]=0;
}
var icd=0;
for (var ikn=0; ikn<overallgoes; ikn++) {
lastgoes[icd]++;
icd++;
if (eval('' + icd) == eval('' + numplayers)) { icd = 0; }
}
//while (cd > 0) {
//lastgoes[icd]++;
//icd++;
//if (icd == numplayers) { icd = 0; }
//cd--;
//}
dolater=false;
//if (eval(overallgoes % numplayers) == 0) {
//lastgoes[0]=eval(overallgoes / numplayers);
//}
}
if (1 == 2) {
if (eval(overallgoes % numplayers) == 0) {
for (var qiuy=0; qiuy<=eval(-1 + numplayers); qiuy++) {
lastgoes[qiuy]=lastgoes[0];
}
} else {
for (var iuy=0; iuy<=eval(-1 + curplayer); iuy++) {
lastgoes[iuy]=lastgoes[0];
}
}
}
//if (eval(overallgoes % numplayers) == 0 && numplayers != 1) {
//lastgoes[eval(-1 + numplayers)]=lastgoes[0];
//}
if (dolater) { lastgoes[0]++; }
if (numplayers > 1) {
infill='' + lastscore[0] + '/' + lastgoes[0];
for (var ijk=1; ijk<lastgoes.length; ijk++) {
infill=infill.replace('/', ':' + lastscore[ijk] + '/') + ':' + lastgoes[ijk];
}
document.title='' + overallscore + '/' + overallgoes + ' ' + infill + ' is User Score/Goes';
} else {
document.title='' + overallscore + '/' + overallgoes + ' is User: Score/Goes';
}
}
}
function dothis(inthing) {
document.title=String.fromCodePoint(eval('' + inthing)); //'🂾';
for (ij=0; ij<spcps.length; ij++) {
if (spcps[ij].indexOf('' + eval(location.search.split('spcp=')[1] ? location.search.split('spcp=')[1].split('&')[0] : '127166')) == 0) {
ji=ij;
}
}
if (ji >= 0) {
fi=document.createElement('link');
fi.rel='icon';
fi.href=cards[ji];
document.head.appendChild(fi);
}
}
</script>
</head>
</html>