<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes" />
<title>0.0/0.0 is User Score/Goes ... up to 52 players can take it in turns with our Numbers Quiz - RJM Programming - April, 2021</title>
<script type='text/javascript'>
// set up wsuffs[] with spelt out English card list (eg: 2.5: King of Clubs) and set as title of name textbox title
var defstyle="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL('//www.rjmprogramming.com.au/rjmquiz_plus.jpg') repeat contain; } </style>";
var nextdealer=location.search.split('nextdealer=')[1] ? eval(location.search.split('nextdealer=')[1].split('&')[0]) : 1;
var documenttitle=document.title;
var pmesg='', pretv='';
var lastcde='', lastconf='';
var lastiourx=-1, lastioury=-1;
var thirteen=4; //13;
var four=13; //4;
var dotzero='.0';
var xpass=0;
var dsdn=" style='display:none;'";
var rsdn=" style='display:none;'";
var doublefactor=1;
var card_game='memories';
var in_bidding=false;
var in_kitty=false;
var gameover='';
var afterss='';
var llj='';
var omh=-1;
var doteleven='.11';
var omc=-1;
var aaurl='', aass='';
var kemoji='';
var sssdone=false;
var bgi=0;
var pnames=[];
var ccnames=[];
var bccnames=[];
var mailtos=[];
var bbtextb="<rect x='0' y='0' width='1400' height='48' fill='rgba(255,0,0,0.3)' />";
var alertObj=null, h1=null, btn=null, msg=null, dafi=null;
function removeCustomAlert() {
document.getElementsByTagName("head")[0].removeChild(document.getElementById("modalContainer"));
}
function newalert(alblurb) { // https://stackoverflow.com/questions/7853130/how-to-change-the-style-of-alert-box
console.log('1');
dafi=document.createElement('div');
//dafi.target='_blank';
dafi.style.height = document.documentElement.scrollHeight + "px";
dafi.id = "modalContainer";
console.log('11');
alertObj = document.head.appendChild(dafi);
console.log('111');
alertObj = dafi.appendChild(document.createElement("div"));
console.log('1111');
alertObj.id = "alertBox";
if (document.all && !window.opera) alertObj.style.top = document.documentElement.scrollTop + "px";
console.log('12');
alertObj.style.left = (document.documentElement.scrollWidth - alertObj.offsetWidth)/2 + "px";
alertObj.style.visiblity="visible";
console.log('122');
h1 = alertObj.appendChild(document.createElement("h1"));
h1.appendChild(document.createTextNode('Our alert box'));
console.log('1222');
msg = alertObj.appendChild(document.createElement("p"));
//msg.appendChild(d.createTextNode(txt));
msg.innerHTML = alblurb;
console.log('13');
btn = alertObj.appendChild(document.createElement("a"));
btn.id = "closeBtn";
btn.appendChild(document.createTextNode(alblurb));
btn.href = "#";
btn.focus();
btn.onclick = function() { removeCustomAlert(); return false; }
console.log('133');
alertObj.style.display = "block";
console.log('14');
}
function lljsfhzfalse() {
llj=asfhz(false);
}
function progressbar(inoutss) {
var outss=inoutss;
var ipss=scoresuffix;
var opss=scoresuffix;
if (outss == '') { outss=scoresuffix; }
var totball=0;
var totnball=0;
var offset=0;
var tks=10;
if (card_game.toLowerCase() == 'bridge') { offset=6; tks=13; }
if (card_game == ulgame('500ISH')) { // && cbid.replace('None','pass') != 'pass') {
var prevbb=bbtextb;
var tonget=0;
var ssare=outss.replace(/\-/g,'').split(',');
var ssallare=outss.split(',');
var abbtextb=bbtextb;
if (!in_bidding && !in_kitty) {
var tott=eval(Math.floor(eval(ssare[0])) + Math.floor(eval(ssare[1])) + Math.floor(eval(ssare[2])) + Math.floor(eval(ssare[3])));
var totb=0;
var totnb=0;
var toget=-10;
if (('' + cbid).substring(0,1) == '1' && ('' + cbid).substring(0,2) != '10') { toget=eval(1 + offset); tonget=eval(tks - toget); }
if (('' + cbid).substring(0,1) == '2') { toget=eval(2 + offset); tonget=eval(tks - toget); }
if (('' + cbid).substring(0,1) == '3') { toget=eval(3 + offset); tonget=eval(tks - toget); }
if (('' + cbid).substring(0,1) == '4') { toget=eval(4 + offset); tonget=eval(tks - toget); }
if (('' + cbid).substring(0,1) == '5') { toget=eval(5 + offset); tonget=eval(tks - toget); }
if (('' + cbid).substring(0,1) == '6') { toget=eval(6 + offset); tonget=eval(tks - toget); }
if (('' + cbid).substring(0,1) == '7') { toget=eval(7 + offset); tonget=eval(tks - toget); }
if (('' + cbid).substring(0,1) == '8') { toget=eval(8 + offset); tonget=eval(tks - toget); }
if (('' + cbid).substring(0,1) == '9') { toget=eval(9 + offset); tonget=eval(tks - toget); }
if (('' + cbid).substring(0,2) == '10') { toget=eval(10 + offset); tonget=eval(tks - toget); }
if (('' + cbidby).replace('3','1') == '1') {
totb=eval(Math.floor(eval(ssare[0])) + Math.floor(eval(ssare[2])));
totnb=eval(Math.floor(eval(ssare[1])) + Math.floor(eval(ssare[3])));
abbtextb="<rect x='0' y='0' width='1400' height='48' fill='rgba(255,0,0,0.3)' />";
} else {
totnb=eval(Math.floor(eval(ssare[0])) + Math.floor(eval(ssare[2])));
totb=eval(Math.floor(eval(ssare[1])) + Math.floor(eval(ssare[3])));
abbtextb="<rect x='0' y='0' width='1400' height='48' fill='rgba(0,255,0,0.3)' />";
}
if (('' + toget) == '-10') {
if (eval('' + totb) > 0) {
gameover='-';
if (llj == '') { lljsfhzfalse(); opss=scoresuffix; }
afterss=' Bid failed. ' + endgameblurb;
bbtextb=abbtextb.replace(" width='" + abbtextb.split(" width='")[1].split("'")[0] + "'", " width='0'");
//if (defstyle.indexOf(prevbb) == -1) { alert('Oops'); }
defstyle=defstyle.replace(prevbb, bbtextb).replace(ipss,opss);
} else {
if (eval('' + totnb) == eval('' + tks)) {
gameover='+';
if (llj == '') { lljsfhzfalse(); opss=scoresuffix; }
afterss=' Bid made. ' + endgameblurb;
}
bbtextb=abbtextb.replace(" width='" + abbtextb.split(" width='")[1].split("'")[0] + "'", " width='" + ('' + eval(-1400 * eval(totnb) / eval(toget))).split('.')[0] + "'");
//if (defstyle.indexOf(prevbb) == -1) { alert('OOps'); }
defstyle=defstyle.replace(prevbb, bbtextb).replace(ipss,opss);
}
} else {
if (eval('' + totnb) > eval('' + tonget)) {
gameover='-';
if (llj == '') { lljsfhzfalse(); opss=scoresuffix; }
afterss=' Bid failed. ' + endgameblurb;
bbtextb=abbtextb.replace(" width='" + abbtextb.split(" width='")[1].split("'")[0] + "'", " width='0'");
//if (defstyle.indexOf(prevbb) == -1) { alert('OoPs'); }
defstyle=defstyle.replace(prevbb, bbtextb).replace(ipss,opss);
} else {
if (eval('' + totb) > eval('' + toget)) {
gameover='+';
if (llj == '') { lljsfhzfalse(); opss=scoresuffix; }
afterss=' Bid made. ' + endgameblurb;
}
bbtextb=abbtextb.replace(" width='" + abbtextb.split(" width='")[1].split("'")[0] + "'", " width='" + ('' + eval(1400 * eval(totb) / eval(toget))).split('.')[0] + "'");
//if (defstyle.indexOf(prevbb) == -1) { alert('OopS'); }
defstyle=defstyle.replace(prevbb, bbtextb).replace(ipss,opss);
}
}
} else { // progress bar RE 1/3 getting to 500 and 2/4 getting to 500
//alert(11);
totball=eval((eval(((ssallare[0].substring(0,1) == '-') ? '-' : '') + (ssallare[0] + dotzero).split('.')[1])) + (eval(((ssallare[2].substring(0,1) == '-') ? '-' : '') + (ssallare[2] + dotzero).split('.')[1])));
var x1=700;
var w1=1400;
var x2=700;
var w2=1400;
if (eval('' + totball) < 0) {
w1=eval(-700 * eval('' + totball) / 500);
x1=eval(700 + eval(700 * eval('' + totball) / 500));
} else {
x1=700;
w1=eval(700 * eval('' + totball) / 500);
}
totnball=eval((eval(((ssallare[1].substring(0,1) == '-') ? '-' : '') + (ssallare[1] + dotzero).split('.')[1])) + (eval(((ssallare[3].substring(0,1) == '-') ? '-' : '') + (ssallare[3] + dotzero).split('.')[1])));
if (eval('' + totnball) < 0) {
w2=eval(-700 * eval('' + totnball) / 500);
x2=eval(700 + eval(700 * eval('' + totnball) / 500));
} else {
x2=700;
w2=eval(700 * eval('' + totnball) / 500);
}
abbtextb="<rect x='" + Math.floor(x1) + "' y='0' width='" + Math.max(Math.floor(w1),1) + "' height='24' fill='rgba(255,0,0,0.3)' /><rect x='" + Math.floor(x2) + "' y='24' width='" + Math.max(Math.floor(w2),1) + "' height='24' fill='rgba(0,255,0,0.3)' />"
bbtextb=abbtextb;
//if (defstyle.indexOf(prevbb) != -1) { alert('abbtextb=' + abbtextb); }
defstyle=defstyle.replace(prevbb, bbtextb);
document.head.innerHTML+=bpmore(defstyle);
}
}
if (inoutss == '') { return bbtextb; }
return outss;
}
var smss=[];
var deftwo=200;
var origt='';
var orighands=[];
var tds_kitty='';
var xsuffs=[];
var hsuffs=[];
var wsuffs=[];
var ssuffs=[];
var msuffs=[];
var rsuffs=[];
var jscores=[];
var gwh='';
var cbid='None';
var sss='';
var cbidby=1;
var endgameblurb='';
var overallss=location.search.split('overallss=')[1] ? decodeURIComponent(location.search.split('overallss=')[1].split('&')[0]).replace(/\+/g,' ') : '0,0';
var overallscores=overallss.split(',');
var cbidrank=-1;
var bidplayer=nextdealer;
var passcnt=0;
var bids=["6s","6c","6d","6h","6n","7s","7c","7d","7h","7n","8s","misère","8c","8d","8h","8n","9s","9c","9d","9h","9n","10s","10c","10d","10h","open_misère","10n"];
var sbid=["40","60","80","100","120","140","160","180","200","220","240","250","260","280","300","320","340","360","380","400","420","440","460","480","500","500","520"];
var tfpx='24px;';
var newtfpx='36px'; //'40px;';
var eypc='80%';
var neweypc='80%';
var eyfb='fill:black;';
var neweyfb='stroke:red;';
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("");
}
}
function oraass(inss) {
if (aass != '') {
if (inss != aass && defstyle.indexOf(inss) != -1) { llj=alterurl(llj); defstyle=defstyle.replace(inss,aass); document.head.innerHTML=bpmore(defstyle); }
return aass;
}
return inss;
}
function alterurl(inllj) {
if (eval(eval('' + jscores[0]) + eval('' + jscores[2])) >= 500) {
endgameblurb='Congratulations, Player 1 and Player 3 for reaching 500. '; //Another game?')) {
//lurldone=true;
//location.href=lurl();
//jscores=[0,0,0,0];
inllj=inllj.replace(inllj.split('scoresuffix=')[1].split('&')[0], encodeURIComponent('0.0,0.0,0.0,0.0'));
overallscores[0]++;
inllj=inllj.replace(inllj.split('overallss=')[1].split('&')[0], encodeURIComponent('' + overallscores[0] + ',' + overallscores[1]));
endgameblurb+=' Overall scores Player 1 and Player 3 - ' + overallscores[0] + ' and Player 2 and Player 4 - ' + overallscores[1] + '. ';
} else if (eval(eval('' + jscores[1]) + eval('' + jscores[3])) >= 500) {
endgameblurb='Congratulations, Player 2 and Player 4 for reaching 500. '; // Another game?')) {
//lurldone=true;
//location.href=lurl();
//jscores=[0,0,0,0];
inllj=inllj.replace(inllj.split('scoresuffix=')[1].split('&')[0], encodeURIComponent('0.0,0.0,0.0,0.0'));
overallscores[1]++;
inllj=inllj.replace(inllj.split('overallss=')[1].split('&')[0], encodeURIComponent('' + overallscores[0] + ',' + overallscores[1]));
endgameblurb+=' Overall scores Player 2 and Player 4 - ' + overallscores[1] + ' and Player 1 and Player 3 - ' + overallscores[0] + '. ';
} else if (eval(eval('' + jscores[0]) + eval('' + jscores[2])) <= -500) {
endgameblurb='Congratulations, Player 2 and Player 4 for opponents reaching -500. '; // Another game?')) {
//lurldone=true;
//location.href=lurl();
//jscores=[0,0,0,0];
inllj=inllj.replace(inllj.split('scoresuffix=')[1].split('&')[0], encodeURIComponent('0.0,0.0,0.0,0.0'));
overallscores[1]++;
inllj=inllj.replace(inllj.split('overallss=')[1].split('&')[0], encodeURIComponent('' + overallscores[0] + ',' + overallscores[1]));
endgameblurb+=' Overall scores Player 2 and Player 4 - ' + overallscores[1] + ' and Player 1 and Player 3 - ' + overallscores[0] + '. ';
} else if (eval(eval('' + jscores[1]) + eval('' + jscores[3])) <= -500) {
endgameblurb='Congratulations, Player 1 and Player 3 for opponents reaching -500. '; // Another game?')) {
//lurldone=true;
//location.href=lurl();
//jscores=[0,0,0,0];
inllj=inllj.replace(inllj.split('scoresuffix=')[1].split('&')[0], encodeURIComponent('0.0,0.0,0.0,0.0'));
overallscores[0]++;
inllj=inllj.replace(inllj.split('overallss=')[1].split('&')[0], encodeURIComponent('' + overallscores[0] + ',' + overallscores[1]));
endgameblurb+=' Overall scores Player 1 and Player 3 - ' + overallscores[0] + ' and Player 2 and Player 4 - ' + overallscores[1] + '. ';
}
return inllj;
}
function documenttitleeq(indt) {
var bburl=aaurl;
var fortyis=40;
documenttitle=indt;
if (card_game.toLowerCase() == 'bridge') { fortyis=52; }
if (card_game.toLowerCase() == ulgame('500ish')) {
if (card_game == ulgame('500ISH')) {
document.title=ulgame('500 card game where winning bid is ' + (dr(cbid) + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass').replace('1','1,Player III').replace('2','2,Player IV').replace('3','3,Player 1').replace('4','4,Player 2').replace('III','3').replace('IV','4') + ' and trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + ' ... ' + scoresuffix + sss);
if (eval('' + nominal_numplayers + ' * (' + scoresuffix.replace(/\,/g, ' + ') + ')') >= fortyis || gameover != '') {
if (eval('' + totcpp) > 0) {
totcpp=-totcpp;
if (llj == '') { llj=sfhz(false); }
if (('' + emailsms[0]).indexOf('@') != -1 && ('' + emailsms[0]).toLowerCase() == ('' + emailsms[0])) {
scoresuffix=oraass(scoresuffix);
location.href=alterurl(llj);
} else if (confirm( ((bburl == aaurl) ? 'Thanks for playing the 500 card game ... ' + oraass(scoresuffix) + sss + ' ... OK to play again?' : endgameblurb + ' Thanks for playing the 500 card game ... ' + oraass(scoresuffix) + sss + ' ... OK to play again?') )) {
location.href=alterurl(llj); //lurl();
}
}
}
} else {
if (cbid.replace('None', '') != '') {
document.title=ulgame('500 card game where winning bid is ' + (dr(cbid) + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass').replace('1','1,Player III').replace('2','2,Player IV').replace('3','3,Player 1').replace('4','4,Player 2').replace('III','3').replace('IV','4') + ' and trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + ' ... ' + scoresuffix + sss);
} else if (in_bidding) {
document.title=ulgame('500 card game ... ' + scoresuffix + sss);
} else {
document.title=ulgame('500 (hybrid) card game ... ' + scoresuffix + sss);
}
if (eval('' + nominal_numplayers + ' * (' + scoresuffix.replace(/\,/g, ' + ') + ')') >= Math.abs(eval('' + totcpp))) {
if (eval('' + totcpp) > 0) {
totcpp=-totcpp;
if (confirm('Thanks for playing the 500 (hybrid) card game ... ' + scoresuffix + sss + ' ... OK to play again?')) {
location.href=document.URL;
}
}
}
}
} else {
document.title=documenttitle;
}
}
function showStuff(evt) {
var ibn=0;
var thiskt='';
var outgoes=0;
var inthree='';
var outthree='';
if (xhr.readyState == 4) {
if (xhr.status == 200) {
sentanswer=xhr.responseText.split('</p>')[0].split('>')[eval(-1 + xhr.responseText.split('</p>')[0].split('>').length)];
//alert('sentanswer=' + sentanswer + '!');
console.log('sentanswer=' + sentanswer);
var nameas=sentanswer.split('[');
if (eval('' + nameas.length) == 2) {
if (nameas[1].indexOf(']') != -1 || 1 == 1) {
while (eval('' + pnames.length) < eval('' + curplayer)) {
pnames.push('Player ' + eval(1 + pnames.length));
}
if (('' + bidplayer).indexOf('-') == -1) {
while (eval('' + pnames.length) < eval('' + bidplayer)) {
pnames.push('Player ' + eval(1 + pnames.length));
}
}
if (nameas[0] != '') {
pnames[eval(-1 + Math.max(eval('' + curplayer),eval('' + bidplayer)))]=nameas[0];
}
sentanswer=sentanswer.replace(nameas[0] + '[','').replace(']','');
}
}
console.log('Sentanswer=' + sentanswer);
var sentas=sentanswer.split('|');
if (eval('' + sentas.length) > 1) {
sentanswer=sentas[0];
for (is=1; is<sentas.length; is++) {
if (sentas[is].indexOf(',-' + curplayer + '.') != -1) {
thiskt=sentas[is].replace(/\ /g,'+');
outgoes=eval(-1 + eval('' + sentas[is].split(',-' + curplayer + '.')[1]));
inthree=hands[eval(39 + eval('' + is))].slice(-3);
outthree=hands[outgoes].slice(-3);
for (ibn=0; ibn<spcps.length; ibn++) {
if (spcps[ibn].indexOf(inthree + '.') != -1) {
inthree=spcps[ibn].split('/')[0];
}
if (spcps[ibn].indexOf(outthree + '.') != -1) {
outthree=spcps[ibn].split('/')[0];
}
}
hands[outgoes]=hands[eval(39 + eval('' + is))];
if (eval('' + outthree.length) == 6 && eval('' + inthree.length) == 6) {
zsuffs[eval(-1 + eval('' + curplayer))]=zsuffs[eval(-1 + eval('' + curplayer))].replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree))).split(' ' + curplayer + doteleven + ':')[0];
ysuffs[eval(-1 + eval('' + curplayer))]=ysuffs[eval(-1 + eval('' + curplayer))].replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree))).split(' ' + curplayer + doteleven + ':')[0];
msuffs[eval(-1 + eval('' + curplayer))]=msuffs[eval(-1 + eval('' + curplayer))].replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
hsuffs[eval(-1 + eval('' + curplayer))]=hsuffs[eval(-1 + eval('' + curplayer))].replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
defstyle=defstyle.replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
defstyle=defstyle.replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
defstyle=defstyle.replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
console.log('a');
document.head.innerHTML+=bpmore(defstyle);
}
}
}
}
console.log('0:sentclick()');
sentclick();
}
}
}
function doesFileExist(urlToFile) { // thanks to https://www.kirupa.com/html5/checking_if_a_file_exists.htm
var erri=null, errj=null;
try {
if (urlToFile != '') {
var xxhr = new XMLHttpRequest();
xxhr.open('HEAD', urlToFile, false);
try {
xxhr.send();
if (xxhr.status == "404") {
return false;
} else {
listenforwhat=''; //console.log(xxhr);
form = new FormData();
xhr = new XMLHttpRequest();
form.append('gamedate', '' + dis);
if (mn != ('Player ' + curplayer)) {
form.append('myname', mn);
}
form.append('myanswer', '');
xhr.open('post', document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php'), true);
xhr.onreadystatechange = showStuff;
xhr.send(form);
//alert('found');
//sentanswer='?.?';
return true;
}
} catch(errj) {
}
} else {
return false;
}
} catch(erri) {
}
return false;
}
var csuffix='';
var gallow=false;
var fey='1400'; //'1100'; // 580
var brad='border-radius:15px;';
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
brad='';
}
var sentanswer='';
var listenforwhat='';
var form=null;
var xhr=null;
var gd = location.search.split('gamedate=')[1] ? decodeURIComponent(location.search.split('gamedate=')[1].split('&')[0]).replace(/\+/g,' ') : '';
var ma = location.search.split('myanswer=')[1] ? decodeURIComponent(location.search.split('myanswer=')[1].split('&')[0]).replace(/\+/g,' ') : '';
var mn = location.search.split('myname=')[1] ? decodeURIComponent(location.search.split('myname=')[1].split('&')[0]).replace(/\+/g,' ') : '';
var psecs=0, secs=0;
var dis=null;
if (gd != '' && ma != '') {
gd=gd;
} else {
var deckn=52;
var hackString='';
var tricknumber=1;
var emstuff='', cemstuff='', wemstuff='', wemstuffx='';
var nav=navigator.userAgent;
// Thanks to https://stackoverflow.com/questions/7996252/window-popups-how-to-get-window-blur-or-window-focus-to-work-in-firefox-4
hackString = nav.indexOf('Chrome') > -1 ? "scrollbar=yes," : "toolbar=0,statusbar=1,resizable=1,scrollbars=0,menubar=0,location=1,directories=0,";
// 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 dragorder=[], dragorderbig=[], curdrag=0, altcards=[];
var cards=["//www.rjmprogramming.com.au/images/01s.gif?n=7",
"//www.rjmprogramming.com.au/images/02s.gif?n=16",
"//www.rjmprogramming.com.au/images/03s.gif?n=33",
"//www.rjmprogramming.com.au/images/04s.gif?n=29",
"//www.rjmprogramming.com.au/images/05s.gif?n=8",
"//www.rjmprogramming.com.au/images/06s.gif?n=35",
"//www.rjmprogramming.com.au/images/07s.gif?n=52",
"//www.rjmprogramming.com.au/images/08s.gif?n=51",
"//www.rjmprogramming.com.au/images/09s.gif?n=12",
"//www.rjmprogramming.com.au/images/10s.gif?n=30",
"//www.rjmprogramming.com.au/images/11s.gif?n=1",
"//www.rjmprogramming.com.au/images/12s.gif?n=36",
"//www.rjmprogramming.com.au/images/13s.gif?n=22",
"//www.rjmprogramming.com.au/images/01h.gif?n=32",
"//www.rjmprogramming.com.au/images/02h.gif?n=23",
"//www.rjmprogramming.com.au/images/03h.gif?n=3",
"//www.rjmprogramming.com.au/images/04h.gif?n=18",
"//www.rjmprogramming.com.au/images/05h.gif?n=28",
"//www.rjmprogramming.com.au/images/06h.gif?n=39",
"//www.rjmprogramming.com.au/images/07h.gif?n=45",
"//www.rjmprogramming.com.au/images/08h.gif?n=48",
"//www.rjmprogramming.com.au/images/09h.gif?n=50",
"//www.rjmprogramming.com.au/images/10h.gif?n=44",
"//www.rjmprogramming.com.au/images/11h.gif?n=4",
"//www.rjmprogramming.com.au/images/12h.gif?n=9",
"//www.rjmprogramming.com.au/images/13h.gif?n=5",
"//www.rjmprogramming.com.au/images/01d.gif?n=27",
"//www.rjmprogramming.com.au/images/02d.gif?n=41",
"//www.rjmprogramming.com.au/images/03d.gif?n=20",
"//www.rjmprogramming.com.au/images/04d.gif?n=11",
"//www.rjmprogramming.com.au/images/05d.gif?n=37",
"//www.rjmprogramming.com.au/images/06d.gif?n=49",
"//www.rjmprogramming.com.au/images/07d.gif?n=42",
"//www.rjmprogramming.com.au/images/08d.gif?n=6",
"//www.rjmprogramming.com.au/images/09d.gif?n=21",
"//www.rjmprogramming.com.au/images/10d.gif?n=31",
"//www.rjmprogramming.com.au/images/11d.gif?n=40",
"//www.rjmprogramming.com.au/images/12d.gif?n=43",
"//www.rjmprogramming.com.au/images/13d.gif?n=17",
"//www.rjmprogramming.com.au/images/01c.gif?n=46",
"//www.rjmprogramming.com.au/images/02c.gif?n=19",
"//www.rjmprogramming.com.au/images/03c.gif?n=47",
"//www.rjmprogramming.com.au/images/04c.gif?n=25",
"//www.rjmprogramming.com.au/images/05c.gif?n=10",
"//www.rjmprogramming.com.au/images/06c.gif?n=15",
"//www.rjmprogramming.com.au/images/07c.gif?n=13",
"//www.rjmprogramming.com.au/images/08c.gif?n=26",
"//www.rjmprogramming.com.au/images/09c.gif?n=38",
"//www.rjmprogramming.com.au/images/10c.gif?n=34",
"//www.rjmprogramming.com.au/images/11c.gif?n=2",
"//www.rjmprogramming.com.au/images/12c.gif?n=14",
"//www.rjmprogramming.com.au/images/13c.gif?n=24"];
// data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='48' viewport='0 0 100 100' style='background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:44px'><!-- 127195 11c --><text y='50%'>2.1</text></svg>
var altcw=-1;
var nominal_implication='';
var nominal_numplayers = null;
if (document.URL.indexOf('scoresuffix=') != -1 && decodeURIComponent(document.URL).indexOf('04.0') != -1) {
nominal_numplayers = '04.0';
} else if (document.URL.indexOf('scoresuffix=') != -1 && decodeURIComponent(document.URL).indexOf('04.1') != -1) {
nominal_numplayers = '04.1';
} else {
//nominal_numplayers = (document.URL.replace('?','&').indexOf('&card') != -1) ? prompt('How many players in ' + document.URL.replace('?','&').split('&card')[1].split('&')[0].split('#')[0].split('=')[0].replace(/\_/g,' ').trim().substring(0,1).toUpperCase() + document.URL.replace('?','&').split('&card')[1].split('&')[0].split('#')[0].split('=')[0].replace(/\_/g,' ').trim().substring(1).toLowerCase() + ' card game (if Zebra (ie. with cross colour match) prefix answer by + & if Any Colour (ie. just with same colour) prefix answer by -) & suffix by .0 for hybrid 500 card game (.1 for bridge) (or 04.0 (04.1 for bridge) for 4 player bidding version & optionally comma delimit email/SMS addresses/numbers ( eg. 04.0,Robert Metcalfe[rmetcalfe15@gmail.com; rmetcalfe41@gmail.com], RMet[rmetcalfe15@gmail.com], RM[rmetcalfe41@gmail.com], R.M[rmetcalfe41@gmail.com] ) & for lack of suit following use space at end, else "turn away" popups)?', (location.search.split('card_memories=')[1] ? (decodeURIComponent(location.search.split('card_memories=')[1] + '~').split('&')[0]).toLowerCase().split('a')[0].split('b')[0].split('c')[0].split('d')[0].split('e')[0].split('f')[0].split('g')[0].split('h')[0].split('i')[0].split('j')[0].split('k')[0].split('l')[0].split('m')[0].split('n')[0].split('o')[0].split('p')[0].split('q')[0].split('r')[0].split('s')[0].split('t')[0].split('u')[0].split('v')[0].split('w')[0].split('x')[0].split('y')[0].split('z')[0].replace(/^\~/g,'2').replace(/\~/g,'') : '2')) : null;
nominal_numplayers = (document.URL.replace('?','&').indexOf('&card') != -1) ? prompt('How many players in ' + document.URL.replace('?','&').split('&card')[1].split('&')[0].split('#')[0].split('=')[0].replace(/\_/g,' ').trim().substring(0,1).toUpperCase() + document.URL.replace('?','&').split('&card')[1].split('&')[0].split('#')[0].split('=')[0].replace(/\_/g,' ').trim().substring(1).toLowerCase() + ' card game (if Zebra (ie. with cross colour match) prefix answer by + & if Any Colour (ie. just with same colour) prefix answer by -) & suffix by .0 for hybrid 500 card game (.1 for bridge) (or 04.0 (04.1 for bridge) for 4 player bidding version & optionally comma delimit email/SMS addresses/numbers ( eg. 04.0,Robert Metcalfe[rmetcalfe15@gmail.com; rmetcalfe41@gmail.com], RMet[rmetcalfe15@gmail.com], RM[rmetcalfe41@gmail.com], R.M[rmetcalfe41@gmail.com] ) & for lack of suit following use space at end, else "turn away" popups)?', (location.search.split('card_memories=')[1] ? (decodeURIComponent(location.search.split('card_memories=')[1] + '~').split('&')[0]).toLowerCase().split('a')[0].split('b')[0].split('c')[0].split('d')[0].split('e')[0].split('f')[0].split('g')[0].split('h')[0].split('i')[0].split('j')[0].split('k')[0].split('l')[0].split('m')[0].split('n')[0].split('o')[0].split('p')[0].split('q')[0].split('r')[0].split('s')[0].split('t')[0].split('u')[0].split('v')[0].split('w')[0].split('x')[0].split('y')[0].split('z')[0].replace(/^\~/g,'2').replace(/\~/g,'') : '2')) : null;
}
var communication_list='';
var emailsms=[];
setTimeout(secsu,1000);
if (nominal_numplayers) {
if (('' + nominal_numplayers) != ('' + nominal_numplayers).trim()) { gallow=true; }
if (('' + nominal_numplayers).trim().indexOf(',') != -1) {
communication_list=fes(nominal_numplayers,-1).replace(nominal_numplayers.split(',')[0] + ',','');
emailsms=communication_list.split(',');
}
if (('' + nominal_numplayers).split(',')[0].trim().indexOf('04.0') != -1) {
card_game='500ISH';
nominal_numplayers=nominal_numplayers.replace('04.0','4.0');
in_bidding=true;
} else if (('' + nominal_numplayers).split(',')[0].trim().indexOf('04.1') != -1) {
card_game='BRIDGE';
nominal_numplayers=nominal_numplayers.replace('04.1','4.0');
dotzero='.1';
doteleven='youllneverfindthis';
in_bidding=true;
} else if (('' + nominal_numplayers).split(',')[0].trim().indexOf('.1') != -1) {
card_game='bridge';
}
if (('' + nominal_numplayers).trim().indexOf('+') == 0) {
nominal_numplayers=nominal_numplayers.replace(/\+/g,'').split('.')[0];
backi='/PHP/animegif/white.jpg';
card_game='zebra';
} else if (('' + nominal_numplayers).trim().indexOf('-') == 0) {
nominal_numplayers=nominal_numplayers.replace(/\-/g,'').split('.')[0];
backi='/PHP/animegif/white.jpg';
card_game='any_colour';
} else if (('' + nominal_numplayers).trim().indexOf('.') != -1) {
//alert('card_game=' + card_game + ' and ulgame()=' + ulgame('500ISH'));
if (('' + nominal_numplayers).trim().indexOf('.0') != -1 || ('' + nominal_numplayers).trim().indexOf('.1') != -1) {
if (card_game == ulgame('500ISH')) {
if (card_game.toLowerCase() == 'bridge') {
bids=["1c","1d","1h","1s","1n", "2c","2d","2h","2s","2n", "3c","3d","3h","3s","3n", "4c","4d","4h","4s","4n", "5c","5d","5h","5s","5n", "6c","6d","6h","6s","6n", "7c","7d","7h","7s","7n", "double", "redouble"];
sbid=["20","20","30","30","40", "40","40","60","60","70", "60","60","90","90","100", "80","80","120","120","130", "100","100","150","150","160", "120","120","180","180","190", "140","140","210","210","220", "0", "0"];
} else {
//Ten cards are dealt each player in a three-four-three sequence, and three cards are dealt facedown to the table as a “widow.”
spcps=["127137/images/01s.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",
"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",
"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",
"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"];
// 16,33,23,3,18,41,20,11,19,47
cards=["//www.rjmprogramming.com.au/images/01s.gif?n=7",
"//www.rjmprogramming.com.au/images/04s.gif?n=29",
"//www.rjmprogramming.com.au/images/05s.gif?n=8",
"//www.rjmprogramming.com.au/images/06s.gif?n=35",
"//www.rjmprogramming.com.au/images/07s.gif?n=16",
"//www.rjmprogramming.com.au/images/08s.gif?n=33",
"//www.rjmprogramming.com.au/images/09s.gif?n=12",
"//www.rjmprogramming.com.au/images/10s.gif?n=30",
"//www.rjmprogramming.com.au/images/11s.gif?n=1",
"//www.rjmprogramming.com.au/images/12s.gif?n=36",
"//www.rjmprogramming.com.au/images/13s.gif?n=22",
"//www.rjmprogramming.com.au/images/01h.gif?n=32",
"//www.rjmprogramming.com.au/images/05h.gif?n=28",
"//www.rjmprogramming.com.au/images/06h.gif?n=39",
"//www.rjmprogramming.com.au/images/07h.gif?n=23",
"//www.rjmprogramming.com.au/images/08h.gif?n=3",
"//www.rjmprogramming.com.au/images/09h.gif?n=18",
"//www.rjmprogramming.com.au/images/10h.gif?n=41",
"//www.rjmprogramming.com.au/images/11h.gif?n=4",
"//www.rjmprogramming.com.au/images/12h.gif?n=9",
"//www.rjmprogramming.com.au/images/13h.gif?n=5",
"//www.rjmprogramming.com.au/images/01d.gif?n=27",
"//www.rjmprogramming.com.au/images/05d.gif?n=37",
"//www.rjmprogramming.com.au/images/06d.gif?n=20",
"//www.rjmprogramming.com.au/images/07d.gif?n=42",
"//www.rjmprogramming.com.au/images/08d.gif?n=6",
"//www.rjmprogramming.com.au/images/09d.gif?n=21",
"//www.rjmprogramming.com.au/images/10d.gif?n=31",
"//www.rjmprogramming.com.au/images/11d.gif?n=40",
"//www.rjmprogramming.com.au/images/12d.gif?n=19",
"//www.rjmprogramming.com.au/images/13d.gif?n=17",
"//www.rjmprogramming.com.au/images/01c.gif?n=11",
"//www.rjmprogramming.com.au/images/04c.gif?n=25",
"//www.rjmprogramming.com.au/images/05c.gif?n=10",
"//www.rjmprogramming.com.au/images/06c.gif?n=15",
"//www.rjmprogramming.com.au/images/07c.gif?n=13",
"//www.rjmprogramming.com.au/images/08c.gif?n=26",
"//www.rjmprogramming.com.au/images/09c.gif?n=38",
"//www.rjmprogramming.com.au/images/10c.gif?n=34",
"//www.rjmprogramming.com.au/images/11c.gif?n=2",
"//www.rjmprogramming.com.au/images/12c.gif?n=14",
"//www.rjmprogramming.com.au/images/13c.gif?n=24"];
deckn=eval('' + cards.length);
thirteen=4; //13;
four=11; //4;
}
} else {
card_game=ulgame('500ish');
}
nominal_numplayers=nominal_numplayers.replace(/\ /g,'');
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
tfpx='35px;';
newtfpx='95px;';
if (navigator.userAgent.match(/iPad/i)) {
eypc='50%';
neweypc="60%' x='10%";
} else {
eypc='50%';
neweypc="-60' x='10%";
newtfpx='95px;';
}
} else {
tfpx='30px;';
newtfpx='45px;';
eypc='65%';
neweypc="65%' x='30%";
}
if (card_game.toLowerCase() != 'bridge') {
deckn++;
//alert('why ' + deckn);
cards.push("//www.rjmprogramming.com.au/images/000.gif?n=" + deckn);
spcps.push("127183/images/000.gif");
}
} else if (('' + nominal_numplayers).trim().indexOf('.1') != -1) {
card_game='BRIDGE';
}
nominal_numplayers=nominal_numplayers.split('.')[0];
backi='/PHP/animegif/white.jpg';
}
if (('' + nominal_numplayers).trim().indexOf('+') == 0) { nominal_numplayers=nominal_numplayers.replace(/\+/g,''); backi='/PHP/animegif/white.jpg'; card_game='zebra'; }
if (('' + nominal_numplayers).trim().indexOf('-') == 0) { nominal_numplayers=nominal_numplayers.replace(/\-/g,''); backi='/PHP/animegif/white.jpg'; card_game='any_colour'; }
if (('' + nominal_numplayers).replace('0','').trim() != '' && ('' + nominal_numplayers).replace('0','').trim().indexOf('-') == -1) {
var jsz=0;
var jsa=location.search.split('scoresuffix=')[1] ? decodeURIComponent(location.search.split('scoresuffix=')[1].split('&')[0]).replace(/\+/g,' ') : '';
var ess=location.search.split('emailsms=')[1] ? decodeURIComponent(location.search.split('emailsms=')[1].split('&')[0]).replace(/\+/g,' ') : '';
var pns=location.search.split('names=')[1] ? decodeURIComponent(location.search.split('names=')[1].split('&')[0]).replace(/\+/g,' ') : '';
if (pns.trim() != '') { pnames=pns.split(','); }
for (jsz=0; jsz<nominal_numplayers; jsz++) {
ccnames.push('');
bccnames.push('');
if (eval('' + pnames.length) > eval('' + jsz)) {
if (('' + pnames[jsz].trim()) == '') {
pnames.push('Player ' + eval(1 + jsz));
}
} else {
pnames.push('Player ' + eval(1 + jsz));
}
}
if (ess != '') {
//alert(ess);
var ejas=('' + fes(ess,-2)).split(',');
for (ejz=0; ejz<ejas.length; ejz++) {
emailsms[ejz]=ejas[ejz]; //fes(ejas[ejz],ejz);
}
}
if (jsa != '') {
var jsas=jsa.split(',');
for (jsz=0; jsz<jsas.length; jsz++) {
if (jsas[jsz].indexOf('.') != -1) {
if (jsas[jsz].indexOf('-') != -1) {
jscores.push(eval('-' + jsas[jsz].split('.')[1]));
} else {
jscores.push(eval(jsas[jsz].split('.')[1]));
}
} else {
jscores.push(0);
}
}
if (card_game == ulgame('500ISH')) {
if (eval(eval('' + jscores[0]) + eval('' + jscores[2])) >= 500) {
alert('Congratulations, Player 1 and Player 3 for reaching 500');
jscores=[0,0,0,0];
} else if (eval(eval('' + jscores[1]) + eval('' + jscores[3])) >= 500) {
alert('Congratulations, Player 2 and Player 4 for reaching 500');
jscores=[0,0,0,0];
} else if (eval(eval('' + jscores[0]) + eval('' + jscores[2])) <= -500) {
alert('Congratulations, Player 2 and Player 4 for opponents reaching -500');
jscores=[0,0,0,0];
} else if (eval(eval('' + jscores[1]) + eval('' + jscores[3])) <= -500) {
alert('Congratulations, Player 1 and Player 3 for opponents reaching -500');
jscores=[0,0,0,0];
}
}
} else {
for (jsz=0; jsz<nominal_numplayers; jsz++) {
jscores.push(0);
}
}
if (card_game.toLowerCase() != ulgame('500ish')) {
var prompt = function(zwords, defwords){ return null; };
nominal_implication=" var prompt = function(zwords, defwords){ return null; }; ";
}
fiftytwo=-1;
if (card_game == 'memories') { backi="/Games/Memories/Memories.jpg"; }
} else {
nominal_numplayers=null;
}
}
var fi=null;
var ij=0, ji=-1, kl='', kq=-1;
var donelist=[], oplist=[], opltlistl=[], opltlistt=[], oopltlistl=[], oopltlistt=[], oplistname=[];
var owidth=20, oheight=20;
var oowidth=20, ooheight=20;
var oleft=235, thisleft=235;
var firstbit=' Will accept Q?A (sessional questions ended via ? & cleared with ?x) or Q?!A (local ended via ?! & cleared with ?!x). Versus Memories or ';
var otop=100, thistop=100;
var uis='';
var force=false;
var overallgoes=0, overallscore=0;
var numplayers=1, curplayer=nextdealer, lastcurplayer=nextdealer;
var lastgoes=[0], lastscore=[0];
var clastgoes='0', clastscore='0';
var theblurb='', wblurb='';
var lastdts0='';
var lastsq=-1;
var sslistq=[], sslista=[];
var lslistq=[], lslista=[];
var redone=false;
var flexible=false;
var nomap=true;
var found=false;
var eles=[];
var nullv='' + eval(-1 + deckn);
var cw=-1;
var defstcp='127166';
var stcprefix='';
var lastdrag='';
var wastitle='0.0/0.0 is User Score/Goes ... up to ' + deckn + ' players can take it in turns with our Numbers Quiz - RJM Programming - April, 2021';
var given="Given answer is integer from 0 to 25 ... ";
var iourx=-1, ioury=-1;
var aminmiddle=false;
var da='';
var dp='';
var def='', os='', ps='', pg='';
var lastzkq='', lastzkl='';
var scoresuffix='';
var donelistis=',';
var nogolist=',';
var susslist=',';
var curpcols=['0,0,255,','0,255,0,','255,0,0,','0,0,127,','0,127,0,','127,0,0,', '255,0,255,','255,255,0,','0,255,255,', '127,0,127,','127,127,0,','0,127,127,'];
var hands=[], trumpsare='', thishand=[], lastwinner=nextdealer, thehand=',';
var tcp=0, tcpnum=1;
var iflip=0, cpp=deckn, totcpp=deckn, backis="//www.rjmprogramming.com.au/images/back01.gif";
var zsuff='', zsuffs=[], ysuffs=[];
var ocp=null;
var dhicp='<style> html { cursor: url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>1.1</text></svg>") 16 0, pointer; } </style>';
var lasttogglenumber='';
var lastec='', notyet=false;
var backi="/rjmquiz_plus.jpg";
var fiftytwo=deckn;
var message='';
var lastcard='';
var lasttto='';
var dhi='';
var prevsb='';
var covercover=',cover,cover';
var gamescoreprefix='';
var gamescores=[0];
var lasttmid='';
var lasttfrom='';
var lasttoggleto='';
var lasttogglefrom='';
var card_of_play=0;
var csuff=String.fromCodePoint(8320 + eval('' + curplayer));
if (nominal_numplayers) {
prevsb=String.fromCodePoint(10067,10068) + csuff;
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
covercover=',80px 60px,80px 60px';
dhi='<style> html { cursor: url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + String.fromCodePoint(10067,10068) + csuff + '</text></svg>") 16 0, pointer; } </style>';
if (card_game.toLowerCase() != ulgame('500ish')) { document.head.innerHTML+=dhi; }
} else if (card_game.toLowerCase() != ulgame('500ish')) {
//alert('Why? ' + card_game.toLowerCase() + ' vs ulgame()=' + ulgame('500ish'));
document.head.innerHTML+='<style> html { cursor: url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + String.fromCodePoint(10067,10068) + csuff + '</text></svg>") 16 0, pointer; } </style>';
}
}
var ic=0;
var flip=0; //, iflip=0, cpp=52, totcpp=52, backis="//www.rjmprogramming.com.au/images/back01.gif";
if (card_game.toLowerCase() == ulgame('500ish')) {
flip=1;
cpp=Math.floor(eval(eval(-1 + deckn) / eval('' + nominal_numplayers)));
totcpp=eval(cpp * eval('' + nominal_numplayers));
if (card_game == ulgame('500ISH') && card_game.toLowerCase() != 'bridge') {
cpp=11;
totcpp=deckn;
} else if (card_game == ulgame('500ISH') && card_game.toLowerCase() == 'bridge') {
cpp=26;
totcpp=52;
}
//alert('cpp=' + cpp + ' and totcpp=' + totcpp + ' and deckn=' + deckn);
covercover=',580px 60px,580px 60px';
scoresuffix+=sfh('0');
for (var iixc=0; iixc<nominal_numplayers; iixc++) {
zsuffs.push('');
ysuffs.push('');
xsuffs.push('');
hsuffs.push('');
ssuffs.push('');
msuffs.push('');
rsuffs.push('');
wsuffs.push('');
if (iixc != 0) { scoresuffix+=',' + sfh('0'); }
}
progressbar(scoresuffix);
dhi='<style> html { cursor: url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + fey + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '> Click away ' + 'Player ' + csuff + ' ' + scoresuffix.split(' (via ')[0] + '</text>' + progressbar('') + '</svg>") 16 0, pointer; } </style>';
}
for (ic=1; ic<=eval(0 + eval('' + cards.length)); ic++) {
if (nominal_numplayers) {
if (card_game.toLowerCase() == ulgame('500ish')) {
oplistname.push('');
if (eval('' + ic) > eval('' + totcpp)) { if (iflip == 0) { iflip=eval(-1 + ic); } backis="//www.rjmprogramming.com.au/PHP/animegif/white.jpg"; }
found=false;
for (var jjc=1; jjc<=cards.length; jjc++) {
if ((cards[eval(-1 + jjc)] + '~').indexOf('?n=' + ic + '~') != -1) {
if (('' + cards[eval(-1 + ic)]).indexOf('?n=') != -1) {
//alert(backis + "?n=" + cards[eval(-1 + jjc)].split('?n=')[1] + '#' + cards[eval(-1 + jjc)].split('?')[0]);
//altcards.push(backis + "?n=" + cards[eval(-1 + jjc)].split('?n=')[1] + '#' + cards[eval(-1 + jjc)].split('?')[0]);
altcards.push(backis + "?n=" + cards[eval(-1 + ic)].split('?n=')[1] + '#' + cards[eval(-1 + ic)].split('?')[0] + '##' + spcps[eval(-1 + ic)].split('/')[0]);
} else {
altcards.push(backis);
}
found=true;
}
}
} else {
if (cards[eval(-1 + ic)].indexOf('?n=') != -1) {
altcards.push("//www.rjmprogramming.com.au/images/back01.gif?n=" + cards[eval(-1 + ic)].split('?n=')[1] + '#' + cards[eval(-1 + ic)].split('?')[0] + '##' + spcps[eval(-1 + ic)].split('/')[0]);
} else {
altcards.push("//www.rjmprogramming.com.au/images/back01.gif");
}
//cards[eval(-1 + ic)]="//www.rjmprogramming.com.au/images/blank01.gif#" + cards[eval(-1 + ic)];
}
} else {
altcards.push(cards[eval(-1 + ic)]);
}
}
console.log(altcards);
//alert(1);
// if (flip != 0) { // trumps card
// curplayer=1;
// if (cards[iflip].indexOf('?n=') != -1) {
// altcards[iflip]=cards[iflip].split('?')[0] + "?n=" + cards[iflip].split('?n=')[1] + '#' + "//www.rjmprogramming.com.au/images/back01.gif";
// } else {
// altcards[iflip]=cards[iflip].split('?')[0];
// }
// }
if (card_game.toLowerCase() != ulgame('500ish') || 1 == 1) {
for (ic=1; ic<=cards.length; ic++) {
found=false;
for (var jc=1; jc<=cards.length; jc++) {
if ((cards[eval(-1 + jc)] + '~').indexOf('?n=' + ic + '~') != -1) {
dragorder.push(eval(-1 + jc));
dragorderbig.push(eval(spcps[eval(-1 + jc)].split('/')[0]));
if (card_game.toLowerCase() != ulgame('500ish')) {
cards[eval(-1 + jc)]=cards[eval(-1 + jc)].replace('?n=' + ic, '');
}
firstbit+=String.fromCodePoint(eval('' + spcps[eval(-1 + jc)].split('/')[0])) + ' ';
found=true;
}
}
//if (!found) {
// alert('ic=' + ic);
//}
}
}
console.log('dragorder=' + dragorder);
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."];
var ijk=0;
var asq=[];
for (var acv=0; acv<sq.length; acv++) {
asq.push('' + acv);
}
if (document.URL.indexOf('spcp=') == -1) {
if (1 == 2) {
document.head.innerHTML+="<style> html { opacity:1.0; overflow: visible; background-color: yellow; font-size: 36px; background: URL('//www.rjmprogramming.com.au" + backi + "'); background-size: contain; } </style>";
}
var factorx=1.0;
var factory=1.0;
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
factorx=1.0;
factory=1.8; //8;
oleft=Math.floor(eval(235 / factorx));
thisleft=Math.floor(eval(235 / factorx));
otop=Math.floor(eval(198.0 / eval('' + factory)));
thistop=Math.floor(eval(198.0 / eval('' + factory)));
}
if (!redone) { redone=true; reassess(); }
kq='' + Math.floor(Math.random() * sq.length);
documenttitleeq('0.0/0.0 is User Score/Goes ... up to ' + deckn + ' players can take it in turns with our Numbers Quiz');
kl='' + Math.floor(Math.random() * spcps.length);
// kl=16; // kludge
//if (card_game == '500ISH') { alert('totcpp=' + totcpp + ' and kl=' + kl); }
donelist.push('' + kl);
//if (card_game.toLowerCase() == '500ish') {
// cards[ijk]=cards[ijk].split('?')[0] + '?n=' + 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'))");
console.log('prefirst');
if (altcards[kl].indexOf('##') != -1) {
opltlistl.push('.' + altcards[kl].split('##')[1]);
}
eval("oplist.push(windowopen('" + uis + "', '_blank', '" + hackString + "left=" + thisleft + ",top=" + thistop + ",width=20,height=20'))");
if (oplist[eval(-1 + oplist.length)]) {
//oplist[eval(-1 + oplist.length)].document.write("<html><head><link rel=icon href=" + cards[kl] + "><scr" + "ipt type='text/javascript'> var da='" + asq[eval(0 + kq)] + "'; var dp='" + given + sq[kq] + "'; var def=String.fromCodePoint(" + spcps[eval('' + kl)].split('/')[0] + "); function checka(tpa) { var os=''; var ps=eval(window.opener.documenttitle.split('/')[0].trim()); var pg=eval(window.opener.documenttitle.split('/')[1].split(' ')[0]); if (tpa.trim().toLowerCase() == da.toLowerCase()) { ps++; os=tpa.split(da)[1]; } else { pg++; os=tpa.split(tpa.trim())[1]; } window.opener.documenttitleeq(ps + os + '/' + pg + ' is User Score/Goes'); window.close(); } function pa() { if (document.hasFocus()) { if (window.opener.wond(" + eval(-1 + oplist.length) + ")) { window.opener.wosf(" + eval(-1 + oplist.length) + "); var hj=prompt(dp + window.opener.blurb(), def); if (hj == null) { hj=''; } else { hj=window.opener.assess(hj); } if (hj.replace(def,'') == '') { setTimeout(pa,1000); } else { checka(hj); } } else { setTimeout(pa,1000); } } } document.head.innerHTML+=\"<style> html { overflow:visible; background:URL('" + cards[kl] + "'); background-size:contain; background-repeat:no-repeat; } </style>\"; if (document.hasFocus()) { if (window.opener.wond(" + eval(-1 + oplist.length) + ")) { setTimeout(pa,2000); } else { pa(); } } else { pa(); } </scr" + "ipt></head></html>");
oplist[eval(-1 + oplist.length)].document.write("<html><head><link rel=icon href=" + altcards[kl].split('##')[0] + "><scr" + "ipt type='text/javascript'>" + nominal_implication + " var aminmiddle=false; var da='" + asq[eval(0 + kq)] + "'; var dp='" + given + sq[kq] + "'; var def=String.fromCodePoint(" + spcps[eval('' + kl)].split('/')[0] + "); function checka(tpa) { var os=''; var ps=eval(window.opener.documenttitle.split('/')[0].trim()); var pg=eval(window.opener.documenttitle.split('/')[1].split(' ')[0]); if (tpa.trim().toLowerCase() == da.toLowerCase()) { ps++; os=tpa.split(da)[1]; } else { pg++; os=tpa.split(tpa.trim())[1]; } window.opener.documenttitleeq(ps + os + '/' + pg + ' is User Score/Goes'); window.opener.closeit('" + kl + "'); window.close(); } function pa() { if (aminmiddle) { setTimeout(pa, 10000); return false; } if (document.hasFocus()) { var hj=window.opener.ourprompt(" + eval(-1 + oplist.length) + ",dp + window.opener.blurb(), def); if (hj) { aminmiddle=true; setTimeout(function() { hj=prompt(dp + window.opener.blurb(), def); if (hj == null) { hj=''; } else { hj=window.opener.assess(hj); } if (hj.replace(def,'') != '') { checka(hj); } else { setTimeout(pa,10000); } aminmiddle=false; }, 8000); } if (hj == null) { hj=''; } else { hj=window.opener.assess(hj); } if (hj.replace(def,'') == '') { setTimeout(pa,1000); } else { checka(hj); } } else { setTimeout(pa,1000); } } document.head.innerHTML+=\"<style> html { background:URL('" + trumpgames(altcards[kl],kl) + "'); background-size:contain; background-repeat:no-repeat; } </style>\"; pa(); </scr" + "ipt></head></html>");
oplist[eval(-1 + oplist.length)].document.title=documenttitleeq(String.fromCodePoint(eval(spcps[eval('' + donelist[0])].split('/')[0])));
oplist[eval(-1 + oplist.length)].document.name='' + kl;
oplist[eval(-1 + oplist.length)].onfocus = function() { if (documenttitle.indexOf('/') != -1) { wastitle=document.title; setTimeout(reputwas,2000); } }
}
if (huh(oplist[0])) {
if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && card_game.toLowerCase() == ulgame("500ish") && dhi != '') {
//alert(5);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL(" + dhi.split('url(')[1].split(') ')[0] + "); background-repeat: repeat; } </style>";
} else if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && ocp) {
//alert(4);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL(" + ocp.style.cursor.split('url(')[1].split(') ')[0] + "); background-repeat: repeat; } </style>";
} else if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && dhi != '') {
//alert(3);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL(" + dhi.split('url(')[1].split(') ')[0] + "); background-repeat: repeat; } </style>";
} else if (nominal_numplayers && card_game.toLowerCase() == ulgame("500ish") && dhi != '') {
//alert(2);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL(" + dhi.split('url(')[1].split(') ')[0] + "); background-repeat: repeat; } </style>";
} else {
//alert(1);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL('//www.rjmprogramming.com.au" + backi + "'); background-size: contain; } </style>";
}
} else if (nominal_numplayers && card_game.toLowerCase() == ulgame("500ish") && dhi != '') {
//alert('-4 ' + dhi.split('url(')[1].split(') ')[0]);
//alert(dhi.split('url(')[1].split(') ')[0] + ' ... via ' + dhi);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL(" + dhi.split('url(')[1].split(') ')[0] + "); background-repeat: repeat; } </style>";
} //else {
//alert(-5);
//}
var tendone=false;
if (card_game.toLowerCase() == ulgame('500ish')) { tendone=true; }
for (var jijk=1; jijk<spcps.length; jijk++) {
kq='' + Math.floor(Math.random() * sq.length);
kl='' + Math.floor(Math.random() * spcps.length);
// if (jijk == 1) { kl=38; } // kludge 2
if (eval(3 + eval('' + jijk)) == eval('' + spcps.length) && !tendone && ('' + kl) != '10') {
kl='10';
}
while (donelist.indexOf(kl) != -1) {
//alert(kl);
kl='' + Math.floor(Math.random() * spcps.length);
}
donelist.push(kl);
//if (card_game.toLowerCase() == '500ish') {
// cards[jijk]=cards[jijk].split('?')[0] + '?n=' + kl;
//}
if (('' + kl) == '10') {
tendone=true;
}
}
//if (card_game == '500ISH') { alert('donelist.length=' + donelist.length); }
//if (card_game == '500ISH') { alert('altcards.length=' + altcards.length); }
console.log('kl=' + kl);
defstcp=spcps[eval('' + kl)].split('/')[0];
if (huh(oplist[0])) {
dothis('' + donelist[0]);
}
//alert('spcps.length=' + spcps.length);
for (ijk=1; ijk<spcps.length; ijk++) {
kq='' + Math.floor(Math.random() * sq.length);
kl='' + donelist[ijk]; //Math.floor(Math.random() * spcps.length);
//while (donelist.indexOf(kl) != -1) {
// kl='' + Math.floor(Math.random() * spcps.length);
//}
//if (!oplist[0]) {
//donelist.push(kl);
//}
if (1 == 2 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (eval(ijk % eval(2 * thirteen + 1)) == 0) {
thisleft=oleft;
thistop+=eval(eval(screen.height - 100) / eval(four / 1.5)); // four
} else {
thisleft+=eval(eval(screen.width - 235) / eval(2 + eval(2 * thirteen + 1))); // thirteen
}
} else {
if (eval(ijk % eval(2 * thirteen + 1)) == 0) {
thisleft=oleft;
//thistop+=eval(eval(eval(eval(screen.height / factory) - 100) / eval(four / 1.5))); // four
console.log('top change is ' + eval(eval(eval(eval(screen.height - 100) / factory)) / eval(four / 1.5)));
thistop+=eval(eval(eval(eval(screen.height - 100) / factory)) / eval(four / 1.5)); // four
} else {
thisleft+=Math.floor(eval(eval(eval(screen.width * factorx) - eval(235 / factorx)) / eval(2 + eval(2 * thirteen + 1)))); // 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'))");
if (altcards[kl].indexOf('##') != -1) {
opltlistl.push('.' + altcards[kl].split('##')[1]);
}
eval("oplist.push(windowopen('" + uis + "', '_blank', '" + hackString + "left=" + thisleft + ",top=" + thistop + ",width=20,height=20'))");
if (oplist[eval(-1 + oplist.length)]) {
//oplist[eval(-1 + oplist.length)].document.write("<html><head><link rel=icon href=" + cards[kl] + "><scr" + "ipt type='text/javascript'> var da='" + asq[eval(0 + kq)] + "'; var dp='" + given + sq[kq] + "'; var def=String.fromCodePoint(" + spcps[eval('' + kl)].split('/')[0] + "); function checka(tpa) { var os=''; var ps=eval(window.opener.documenttitle.split('/')[0].trim()); var pg=eval(window.opener.documenttitle.split('/')[1].split(' ')[0]); if (tpa.trim().toLowerCase() == da.toLowerCase()) { ps++; os=tpa.split(da)[1]; } else { pg++; os=tpa.split(tpa.trim())[1]; } window.opener.documenttitleeq(ps + os + '/' + pg + ' is User Score/Goes'); window.close(); } function pa() { if (document.hasFocus()) { if (window.opener.wond(" + eval(-1 + oplist.length) + ")) { window.opener.wosf(" + eval(-1 + oplist.length) + "); var hj=prompt(dp + window.opener.blurb(), def); if (hj == null) { hj=''; } else { hj=window.opener.assess(hj); } if (hj.replace(def,'') == '') { setTimeout(pa,1000); } else { checka(hj); } } else { setTimeout(pa,1000); } } } document.head.innerHTML+=\"<style> html { background:URL('" + cards[kl] + "'); background-size:contain; background-repeat:no-repeat; } </style>\"; if (document.hasFocus()) { if (window.opener.wond(" + eval(-1 + oplist.length) + ")) { setTimeout(pa,2000); } else { pa(); } } else { pa(); } </scr" + "ipt></head></html>");
//oplist[eval(-1 + oplist.length)].document.write("<html><head><link rel=icon href=" + altcards[kl] + "><scr" + "ipt type='text/javascript'>" + nominal_implication + " var aminmiddle=false; var da='" + asq[eval(0 + kq)] + "'; var dp='" + given + sq[kq] + "'; var def=String.fromCodePoint(" + spcps[eval('' + kl)].split('/')[0] + "); function checka(tpa) { var os=''; var ps=eval(window.opener.documenttitle.split('/')[0].trim()); var pg=eval(window.opener.documenttitle.split('/')[1].split(' ')[0]); if (tpa.trim().toLowerCase() == da.toLowerCase()) { ps++; os=tpa.split(da)[1]; } else { pg++; os=tpa.split(tpa.trim())[1]; } window.opener.documenttitleeq(ps + os + '/' + pg + ' is User Score/Goes'); window.opener.closeit('" + kl + "'); window.close(); } function pa() { if (aminmiddle) { setTimeout(pa, 10000); return false; } if (document.hasFocus()) { var hj=window.opener.ourprompt(" + eval(-1 + oplist.length) + ",dp + window.opener.blurb(), def); if (hj) { aminmiddle=true; setTimeout(function() { hj=prompt(dp + window.opener.blurb(), def); if (hj == null) { hj=''; } else { hj=window.opener.assess(hj); } if (hj.replace(def,'') != '') { checka(hj); } else { setTimeout(pa,10000); } aminmiddle=false; }, 8000); } if (hj == null) { hj=''; } else { hj=window.opener.assess(hj); } if (hj.replace(def,'') == '') { setTimeout(pa,1000); } else { checka(hj); } } else { setTimeout(pa,1000); } } document.head.innerHTML+=\"<style> html { background:URL('" + trumpgames(altcards[kl],kl) + "'); background-size:contain; background-repeat:no-repeat; } </style>\"; pa(); </scr" + "ipt></head></html>");
oplist[eval(-1 + oplist.length)].document.write("<html><head><link rel=icon href=" + altcards[kl].split('##')[0] + "><scr" + "ipt type='text/javascript'>" + nominal_implication + " var aminmiddle=false; var da='" + asq[eval(0 + kq)] + "'; var dp='" + given + sq[kq] + "'; var def=String.fromCodePoint(" + spcps[eval('' + kl)].split('/')[0] + "); function checka(tpa) { var os=''; var ps=eval(window.opener.documenttitle.split('/')[0].trim()); var pg=eval(window.opener.documenttitle.split('/')[1].split(' ')[0]); if (tpa.trim().toLowerCase() == da.toLowerCase()) { ps++; os=tpa.split(da)[1]; } else { pg++; os=tpa.split(tpa.trim())[1]; } window.opener.documenttitleeq(ps + os + '/' + pg + ' is User Score/Goes'); window.opener.closeit('" + kl + "'); window.close(); } function pa() { if (aminmiddle) { setTimeout(pa, 10000); return false; } if (document.hasFocus()) { var hj=window.opener.ourprompt(" + eval(-1 + oplist.length) + ",dp + window.opener.blurb(), def); if (hj) { aminmiddle=true; setTimeout(function() { hj=prompt(dp + window.opener.blurb(), def); if (hj == null) { hj=''; } else { hj=window.opener.assess(hj); } if (hj.replace(def,'') != '') { checka(hj); } else { setTimeout(pa,10000); } aminmiddle=false; }, 8000); } if (hj == null) { hj=''; } else { hj=window.opener.assess(hj); } if (hj.replace(def,'') == '') { setTimeout(pa,1000); } else { checka(hj); } } else { setTimeout(pa,1000); } } document.head.innerHTML+=\"<style> html { background:URL('" + trumpgames(altcards[kl],kl) + "'); background-size:contain; background-repeat:no-repeat; } </style>\"; pa(); </scr" + "ipt></head></html>");
oplist[eval(-1 + oplist.length)].document.title=documenttitleeq(String.fromCodePoint(eval(spcps[eval('' + kl)].split('/')[0])));
oplist[eval(-1 + oplist.length)].document.name='' + kl;
oplist[eval(-1 + oplist.length)].onfocus = function() { if (documenttitle.indexOf('/') != -1) { wastitle=document.title; setTimeout(reputwas,2000); } }
}
}
documenttitleeq('0.0/0.0 is User Score/Goes ... up to ' + deckn + ' players can take it in turns with our Numbers Quiz - RJM Programming - April, 2021');
if (!oplist[0] || 7 == 7) {
owidth=eval('' + eval('' + opltlistl[1]) - eval('' + opltlistl[0]));
//if (card_game.toLowerCase() == '500ish') { tfpx='' + owidth + 'px'; }
oheight=eval('' + eval('' + opltlistt[9]) - eval('' + opltlistt[0]));
oowidth=owidth;
ooheight=oheight;
defstyle=defstyle.replace(/20px\ /g, ('' + owidth).split('.')[0] + 'px ');
defstyle=defstyle.replace(/20px\,/g, ('' + oheight).split('.')[0] + 'px,');
defstyle=defstyle.replace(/20px\;/g, ('' + oheight).split('.')[0] + 'px;');
if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && card_game.toLowerCase() == ulgame("500ish") && dhi != '') {
defstyle=defstyle.replace(';background-size:', ',no-repeat,no-repeat' + ';background-size:');
} else if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && ocp) {
defstyle=defstyle.replace(';background-size:', ',repeat,repeat' + ';background-size:');
} else if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && dhi != '') {
defstyle=defstyle.replace(';background-size:', ',repeat,repeat' + ';background-size:');
} else {
defstyle=defstyle.replace(';background-size:', ',no-repeat,no-repeat' + ';background-size:');
}
if (nominal_numplayers) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
defstyle=defstyle.replace(';background-position:', covercover + ';background-position:');
//defstyle=defstyle.replace(';background-position:', ',' + eval(0.7 * screen.width) + 'px ' + eval(0.8 * screen.height) + 'px,' + eval(0.7 * screen.width) + 'px ' + eval(0.8 * screen.height) + 'px' + ';background-position:');
} else {
defstyle=defstyle.replace(';background-position:', covercover + ';background-position:');
}
} else {
if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && ocp) {
defstyle=defstyle.replace(';background-position:', ',80px 60px,80px 60px' + ';background-position:');
} else if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && dhi != '') {
defstyle=defstyle.replace(';background-position:', ',80px 60px,80px 60px' + ';background-position:');
} else {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
defstyle=defstyle.replace(';background-position:', ',' + eval(0.7 * window.innerWidth) + 'px ' + eval(0.8 * window.innerHeight) + 'px,' + eval(0.7 * window.innerWidth) + 'px ' + eval(0.8 * window.innerHeight) + 'px' + ';background-position:');
//defstyle=defstyle.replace(';background-position:', ',' + eval(0.7 * screen.width) + 'px ' + eval(0.8 * screen.height) + 'px,' + eval(0.7 * screen.width) + 'px ' + eval(0.8 * screen.height) + 'px' + ';background-position:');
} else {
defstyle=defstyle.replace(';background-position:', ',' + eval(0.7 * screen.width) + 'px ' + eval(0.8 * screen.height) + 'px,' + eval(0.7 * screen.width) + 'px ' + eval(0.8 * screen.height) + 'px' + ';background-position:');
}
}
}
defstyle=defstyle.replace(';background-image:', ',0px 0px,0px 0px' + ';background-image:');
if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && card_game.toLowerCase() == ulgame("500ish") && dhi != '') {
defstyle=defstyle.replace('; } </style>', (',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(' + dhi.split('url(')[1].split(') ')[0] + '); } </style>')); // + ' ' + owidth + ' ' + oheight
} else if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && ocp) {
defstyle=defstyle.replace('; } </style>', (',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(' + ocp.style.cursor.split('url(')[1].split(') ')[0] + '); } </style>')); // + ' ' + owidth + ' ' + oheight
} else if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && dhi != '') {
defstyle=defstyle.replace('; } </style>', (',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(' + dhi.split('url(')[1].split(') ')[0] + '); } </style>')); // + ' ' + owidth + ' ' + oheight
} else if ((nominal_numplayers && card_game.toLowerCase() == ulgame("500ish")) && dhi != '') {
defstyle=defstyle.replace('; } </style>', (',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(' + dhi.split('url(')[1].split(') ')[0] + '); } </style>')); // + ' ' + owidth + ' ' + oheight
} else {
defstyle=defstyle.replace('; } </style>', (',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(//www.rjmprogramming.com.au' + backi + '); } </style>')); // + ' ' + owidth + ' ' + oheight
}
if (nominal_numplayers) {
// defstyle=defstyle.replace(/\,url\(\/\/www\.rjmprogramming\.com\.au\/images\/back01.gif\)/g,'');
// if (defstyle.indexOf('url(//www.rjmprogramming.com.au/images/back01.gif)') != -1) {
// defstyle=defstyle.replace('url(//www.rjmprogramming.com.au/images/back01.gif)', '').replace(',url(','url(');
// }
if (card_game.toLowerCase() == ulgame('500ish')) {
defstyle=defstyle.replace('} </style>', ' animation: animatedBackground 10s linear infinite; } @keyframes animatedBackground { from { filter: brightness(160%); } to { filter: brightness(190%); } } </style>');
} else {
defstyle=defstyle.replace('} </style>', ' animation: animatedBackground 10s linear infinite; } @keyframes animatedBackground { from { filter: contrast(175%) brightness(120%) saturate(70%); } to { filter: contrast(95%) brightness(90%) saturate(150%); } } </style>');
}
}
console.log('b');
document.head.innerHTML+=bpmore(defstyle);
//console.log(defstyle);
} else if (huh(oplist[0])) {
for (var kijk=0; kijk<spcps.length; kijk++) {
opltlistl.push(oplist[kijk].screenLeft);
opltlistt.push(oplist[kijk].screenTop);
}
}
if (!nominal_numplayers) {
if (huh(oplist[0])) {
setInterval(examinescore, 200);
} else {
examinescore();
}
}
} else {
dothis((location.search.split('spcp=')[1] ? location.search.split('spcp=')[1].split('&')[0] : defstcp));
}
}
function ulgame(instg) {
if (instg.indexOf('500 ') == 0 && card_game.toLowerCase() == 'bridge') {
instg=instg.replace(/500\ /g, 'Bridge ');
} else if (instg.toLowerCase() == instg && card_game.toLowerCase() == 'bridge') {
return 'bridge';
} else if (instg.toUpperCase() == instg && card_game.toLowerCase() == 'bridge') {
return 'BRIDGE';
}
return instg;
}
function sff(ines, nines) { // expand out Player n
var outes='', thisp=0;
ines=ines.replace(/Player\ Player\ /g,'Player ');
if (ines.indexOf('Click away Player ') != -1) {
var withins=ines.split('Click away Player ');
outes=withins[0];
for (var igfd=1; igfd<withins.length; igfd++) {
if (('' + pnames[eval(-1 + eval('' + nines))]) == 'Player ' + nines) {
//alert('Here');
outes+=('Click away Player ' + withins[igfd]);
} else {
//alert('here');
outes+=('Click away Player ' + withins[igfd]).replace('Click away Player ', 'Click away ' + pnames[eval(-1 + eval('' + nines))] + ' ');
}
}
return outes;
}
return ines;
}
function efs(ines, nines) { // expand out Player n
var outes='', thisp=0;
//alert('In ines=' + ines + ' pnames[0]=' + pnames[0]);
if (card_game.toLowerCase() == 'bridge') { ines=ines.replace('Kitty and Bidding proceeds after last ','Bridge card plays start after your successful bid of ').replace(/500\ card/g,'Bridge card').replace(/Five\ Hundred/g,'Bridge').replace(/Five\%20Hundred/g,'Bridge'); }
ines=ines.replace(/Player\ Player\ /g,'Player ');
if (ines.indexOf('Player ') != -1) {
var withins=ines.split('Player ');
outes=withins[0];
for (var igfd=1; igfd<withins.length; igfd++) {
yhisp=withins[igfd].split('[')[0].split(')')[0].split(',')[0].split('?')[0].split('"')[0].split("'")[0].split('<')[0].split(' ')[0];
console.log('yhisp=' + yhisp);
if (('' + yhisp + 'x').substring(0,1) < '0' || ('' + yhisp + 'x').substring(0,1) > '9') {
outes+='Player ' + withins[igfd];
} else if (eval('' + pnames.length) > eval(-1 + eval('' + yhisp))) {
//alert('yhisp=' + yhisp + ' is it in ' + 'Player ' + withins[igfd] + ' ... ' + pnames[eval(-1 + eval('' + yhisp))] + ' += ' + ('Player ' + withins[igfd]).replace('Player ' + yhisp, pnames[eval(-1 + eval('' + yhisp))]) + ' ines=' + ines + ' becomes ' + 'outes=' + outes + ' so far');
outes+=('Player ' + withins[igfd]).replace('Player ' + yhisp, pnames[eval(-1 + eval('' + yhisp))]);
} else {
outes+='Player ' + withins[igfd];
}
}
//alert('Out ines=' + outes.replace('500 Card Game Player', '500 Card Game Player '));
return outes.replace(ulgame('500 Card Game Player'), ulgame('500 Card Game Player ')).replace('è', String.fromCodePoint(232)).replace('open_', 'open ').replace('è', String.fromCodePoint(232)).replace('open_', 'open ');
}
return ines.replace('è', String.fromCodePoint(232)).replace('open_', 'open ').replace('è', String.fromCodePoint(232)).replace('open_', 'open ');
}
function esf(ines, nines) { // if specified name, return that instead
if (eval('' + pnames.length) > eval(0 + Math.max(eval('' + nines),eval('' + nines)))) {
return pnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))];
}
return ines;
}
function fesh(xines) {
if (xines.indexOf('[') != -1) {
return xines.split('[')[1].split(']')[0];
}
return xines;
}
function fes(ines, nines) { // strip Name Of[email@at] to email@at
var blnk='';
var comma=',';
var prevcsuff='';
var sc='';
var subcoms=[];
var hjg='';
var ipl=0, jpl=0;
if (('' + ines) == 'undefined') { ines=''; }
var coms=ines.split(',');
var bcoms=ines.split(',');
if (ines.trim() != ines) { blnk=' '; }
if (eval('' + coms.length) > 1) {
if (eval('' + nines) >= 0) {
if (coms[1].indexOf('@') != -1 && coms[0].indexOf('@') == -1) {
sc=ines.replace(',' + coms[1], '');
ines=coms[1] + ',' + sc;
coms=ines.split(',');
} else if (coms[eval(-1 + coms.length)].indexOf('@') != -1 && coms[0].indexOf('@') == -1) {
sc=ines.replace(',' + coms[eval(-1 + coms.length)], '');
ines=coms[eval(-1 + coms.length)] + ',' + sc;
coms=ines.split(',');
}
ines=coms[0];
for (jpl=1; jpl<coms.length; jpl++) {
if (jpl == 1) {
//alert('In');
if (ccnames[eval('' + nines)] == '') { ccnames[eval('' + nines)]=fesh(coms[jpl]); }
} else {
if (bccnames[eval('' + nines)] == '') { bccnames[eval('' + nines)]=fesh(coms[jpl]); }
}
}
} else {
//alert('in');
var pidis=1;
var ccdone=false;
var bccdone=false;
if (blnk != '') { gallow=true; }
pnames=[];
ccnames=[];
bccnames=[];
var onetoone=false;
//alert(coms[0]);
var numstodo=0;
if (eval('' + nines) == -2) {
numstodo=eval('' + coms.length);
coms=(',' + ines).split(',');
//alert('numstodo=' + numstodo + ' ' + coms.length);
comma='';
} else {
numstodo=Math.floor(eval('' + coms[0].split('.')[0].trim()));
}
if (eval(-1 + eval('' + coms.length)) <= eval('' + numstodo) && ines.indexOf(';') == -1 && ines.indexOf('],') == -1) {
onetoone=true;
ines=coms[0];
} else {
if (eval('' + nines) == -2) {
bcoms=('],' + ines).split('],');
} else {
bcoms=(ines.replace(coms[0] + ',',coms[0] + '],')).split('],');
}
//alert((ines.replace(coms[0] + ',',coms[0] + '],')) + ' numstodo=' + numstodo + ' bcoms.length=' + bcoms.length);
if (eval(-1 + eval('' + bcoms.length)) == eval('' + numstodo)) {
coms=bcoms;
onetoone=true;
ines=coms[0];
} else if (eval('' + bcoms.length) == 2 && ines.indexOf(';') != -1) {
bcoms=(ines.replace(coms[0] + ',',coms[0] + ';')).split(';');
if (eval(-1 + eval('' + bcoms.length)) == eval('' + numstodo)) {
coms=bcoms;
//onetoone=true;
ines=coms[0];
} else if (eval(-1 + eval('' + bcoms.length)) < eval('' + numstodo) && eval(-1 + eval('' + bcoms.length)) > 1) {
coms=bcoms;
//onetoone=true;
ines=coms[0];
}
}
}
if (ines == ('' + coms[0])) {
for (jpl=1; jpl<coms.length; jpl++) {
if (coms[jpl].indexOf('[') != -1) {
pnames.push(coms[jpl].split('[')[0]);
coms[jpl]=coms[jpl].replace(coms[jpl].split('[')[0] + '[', '').replace(';]',']').replace(';]',']').replace(';]',']').replace(';]',']').replace(',]',']').replace(',]',']').replace(',]',']').replace(',]',']').replace(']',''); //.replace(/\;/g,',');
pidis++;
} else {
pnames.push('Player ' + pidis);
pidis++;
}
//alert((coms[jpl].replace(/\;\]/g,']').replace(/\;\]/g,']').replace(/\;\]/g,']').replace(/\;/g,',')));
subcoms=(coms[jpl].replace(/\;/g,',')).split(',');
ccdone=false;
bccdone=false;
for (jjpl=0; jjpl<subcoms.length; jjpl++) {
if (jjpl == 0) { // onetoone?
ines+=comma + subcoms[eval(0 + jjpl)];
//alert('ines=' + ines);
comma=',';
} else if (jjpl == 1) { // onetoone?
//alert('cc is ' + subcoms[eval(0 + jjpl)]);
ccnames.push((subcoms[eval(0 + jjpl)]));
ccdone=true;
} else if (jjpl == 2) { // onetoone?
bccnames.push((subcoms[eval(0 + jjpl)]));
ccdone=false;
bccdone=true;
}
}
if (ccdone) {
bccnames.push('');
} else if (!bccdone) {
ccnames.push('');
bccnames.push('');
}
}
}
}
//alert('' + ines + blnk);
return ('' + ines + blnk);
}
var nameas=ines.split('[');
if (eval('' + nameas.length) == 2) {
if (nameas[1].indexOf(']') != -1 || 1 == 1) {
while (eval('' + pnames.length) < eval('' + nines)) {
pnames.push('Player ' + eval(1 + pnames.length));
}
if (('' + nines).indexOf('-') == -1) {
while (eval('' + pnames.length) < eval('' + nines)) {
pnames.push('Player ' + eval(1 + pnames.length));
}
}
pnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))]=nameas[0];
ines=ines.replace(nameas[0] + '[','').replace(']','');
prevcsuff=csuff;
csuff='';
hjg='' + curplayer;
for (ipl=0; ipl<hjg.length; ipl++) {
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
defstyle=defstylereplace(' ' + prevcsuff + '', ' ' + csuff);
console.log('c');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (ines.indexOf('@') == -1 && ines.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'').trim() != '') {
pnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))]=nameas[0];
ines='';
prevcsuff=csuff;
csuff='';
hjg='' + curplayer;
for (ipl=0; ipl<hjg.length; ipl++) {
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
defstyle=defstylereplace(' ' + prevcsuff + '', ' ' + csuff);
console.log('d');
document.head.innerHTML+=bpmore(defstyle);
} else {
prevcsuff=csuff;
csuff='';
hjg='' + curplayer;
for (ipl=0; ipl<hjg.length; ipl++) {
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
defstyle=defstylereplace(' ' + prevcsuff + '', ' ' + csuff);
console.log('e');
document.head.innerHTML+=bpmore(defstyle);
}
return ('' + ines + blnk);
}
function bigsef(ines, nines) { // expand out email@at
if (eval('' + pnames.length) > eval(0 + Math.max(eval('' + nines),eval('' + nines)))) {
if (eval('' + bccnames.length) > eval(0 + Math.max(eval('' + nines),eval('' + nines))) && eval('' + ccnames.length) > eval(0 + Math.max(eval('' + nines),eval('' + nines)))) {
return (pnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))] + '[' + ines + ';' + ccnames[eval('' + nines)] + ';' + bccnames[eval('' + nines)] + ']').replace('[undefined]', '');
} else if (eval('' + ccnames.length) > eval(0 + Math.max(eval('' + nines),eval('' + nines)))) {
return (pnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))] + '[' + ines + ';' + ccnames[eval('' + nines)] + ']').replace('[undefined]', '');
}
return (pnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))] + '[' + ines + ']').replace('[undefined]', '');
}
if (('' + ines).replace('null','') == '') { return 'Player ' + eval(1 + curplayer); }
return ('' + ines).replace('[undefined]', '');
}
function sef(ines, nines) { // expand out email@at
if (eval('' + pnames.length) > eval(0 + Math.max(eval('' + nines),eval('' + nines)))) {
return (pnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))] + '[' + ines + ']').replace('[undefined]', '');
}
if (('' + ines).replace('null','') == '') { return 'Player ' + eval(1 + curplayer); }
return ('' + ines).replace('[undefined]', '');
}
function ccbcc(ines, nines) { // add to mailto: URL
var ccb='';
//alert('ccnames[0]=' + ccnames[0]);
if (eval('' + ccnames.length) > eval(0 + Math.max(eval('' + nines),eval('' + nines)))) {
if (ccnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))].indexOf('[') != -1) {
ccb='&cc=' + ccnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))].split('[')[1].split(']')[0];
} else {
ccb='&cc=' + ccnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))];
}
if (eval('' + bccnames.length) > eval(0 + Math.max(eval('' + nines),eval('' + nines)))) {
if (bccnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))].indexOf('[') != -1) {
return ccb + '&bcc=' + bccnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))].split('[')[1].split(']')[0];
} else {
return ccb + '&bcc=' + bccnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))];
}
} else if (ccnames[eval(0 + Math.max(eval('' + nines),eval('' + nines)))].indexOf('[') != -1) {
return ccb;
} else {
//alert('ccb=' + ccb);
return ccb;
}
}
return '';
}
function lurl() {
if (aaurl != '') { return aaurl; }
var aurl=document.URL.split('#')[0].split('?')[0];
aurl='?card_memories=04' + dotzero;
aurl+='&overallss=' + encodeURIComponent(overallss);
aurl+='&scoresuffix=' + encodeURIComponent(scoresuffix);
nextdealer++;
if (nextdealer == 5) { nextdealer=1; }
aurl+='&nextdealer=' + encodeURIComponent(nextdealer);
if (eval('' + emailsms.length) > 0) { aurl+='&emailsms=' + encodeURIComponent(bigsef(emailsms[0],0)); }
for (var iij=1; iij<4; iij++) {
if (eval('' + emailsms.length) > eval('' + iij)) {
aurl+=encodeURIComponent(',' + bigsef(emailsms[iij],iij));
}
}
if (aaurl == '') { aaurl=aurl; aass=scoresuffix; aaurl=alterurl(aurl); aurl=aaurl; }
return aurl;
}
function clater() {
if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && card_game.toLowerCase() == ulgame("500ish") && dhi != '') {
//alert(5);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL(" + dhi.split('url(')[1].split(') ')[0] + "); background-repeat: repeat; } </style>";
} else if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && ocp) {
//alert(4);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL(" + ocp.style.cursor.split('url(')[1].split(') ')[0] + "); background-repeat: repeat; } </style>";
} else if ((nominal_numplayers && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && dhi != '') {
//alert(3);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL(" + dhi.split('url(')[1].split(') ')[0] + "); background-repeat: repeat; } </style>";
} else if (nominal_numplayers && card_game.toLowerCase() == ulgame("500ish") && dhi != '') {
//alert(dhi);
//dhi='<style> html { cursor: url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + emojisuit() + '</text></svg>") 16 0, pointer; } </style>';
document.head.innerHTML+='<style> html { cursor: url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + emojisuit() + '</text></svg>") 16 0, pointer; } </style>'; //"<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL(" + dhi.split('url(')[1].split(') ')[0] + "); background-repeat: repeat; } </style>";
} else {
//alert(1);
document.head.innerHTML+="<style> html { opacity:1.0; overflow:visible; background-color: yellow; font-size: 36px; background: URL('//www.rjmprogramming.com.au" + backi + "'); background-size: contain; } </style>";
}
}
function snapshot(defb) {
if (prevsb != '') {
//if (dhi.indexOf('url(') != -1) {
//alert('here');
return 'url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + 'margin-left:5px;border-radius:15px;background-color:rgba(' + curpcols[eval(eval(-1 + curplayer) % eval('' + curpcols.length))] + '0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '> ' + String.fromCodePoint(10004) + ' ' + csuff + '</text></svg>")';
//}
}
return defb;
}
function antilastec() {
if (card_game.toLowerCase() != ulgame('500ish') || 1 == 1) { lastec=''; }
}
function antinotyet() {
if (card_game.toLowerCase() != ulgame('500ish') || 1 == 1) { notyet=true; }
}
function domessagetwo() {
gamescoreprefix='Tricks taken are ' + gamescores[0];
for (var ijkhl=1; ijkhl<eval('' + nominal_numplayers); ijkhl++) {
if (eval('' + gamescores.length) > eval('' + ijkhl)) {
gamescoreprefix+=':' + gamescores[eval('' + ijkhl)];
} else {
gamescoreprefix+=':0';
}
}
if (message != '') {
csuff='';
var hjg='' + curplayer;
for (var ipl=0; ipl<hjg.length; ipl++) {
//alert(hjg.substring(ipl,eval(1 + eval('' + ipl))) + ' has ord ' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0) + ' to ' + eval(8304 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
if (card_game.toLowerCase() != ulgame('500ish')) {
if (ocp) {
if (card_game.toLowerCase() != ulgame('500ish')) { ocp.style.cursor='url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + String.fromCodePoint(10067,10068) + csuff + '</text></svg>") 16 0, pointer'; }
if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10067,10068) + csuff);
prevsb=String.fromCodePoint(10067,10068) + csuff;
//document.head.innerHTML+=defstyle;
}
} else if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10067,10068) + csuff);
prevsb=String.fromCodePoint(10067,10068) + csuff;
//document.head.innerHTML+=defstyle;
}
}
alert(gamescoreprefix + ' ... ' + message + '');
message='';
defstyle=defstyle.replace(toggleto, togglefrom);
defstyle=defstyle.replace(lasttoggleto, lasttogglefrom);
document.head.innerHTML+=defstyle;
lasttto='';
lasttmid='';
lasttfrom='';
lasttoggleto='';
lasttogglefrom='';
lastcard='';
lasttogglenumber='';
}
susslist=',';
}
function domessage() {
gamescoreprefix='Tricks taken are ' + gamescores[0];
for (var ijkhl=1; ijkhl<eval('' + nominal_numplayers); ijkhl++) {
if (eval('' + gamescores.length) > eval('' + ijkhl)) {
gamescoreprefix+=':' + gamescores[eval('' + ijkhl)];
} else {
gamescoreprefix+=':0';
}
}
if (message != '') {
csuff='';
var hjg='' + curplayer;
for (var ipl=0; ipl<hjg.length; ipl++) {
//alert(hjg.substring(ipl,eval(1 + eval('' + ipl))) + ' has ord ' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0) + ' to ' + eval(8304 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
if (card_game.toLowerCase() != ulgame('500ish')) {
if (ocp) {
if (card_game.toLowerCase() != ulgame('500ish')) { ocp.style.cursor='url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + String.fromCodePoint(10067,10068) + csuff + '</text></svg>") 16 0, pointer'; }
if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10067,10068) + csuff);
prevsb=String.fromCodePoint(10067,10068) + csuff;
//document.head.innerHTML+=defstyle;
}
} else if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10067,10068) + csuff);
prevsb=String.fromCodePoint(10067,10068) + csuff;
//document.head.innerHTML+=defstyle;
}
}
alert(gamescoreprefix + ' ... ' + message + '');
message='';
// Thanks to https://css-tricks.com/more-control-over-css-borders-with-background-image/
//alert(' repeating-linear-gradient(0deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px), repeating-linear-gradient(90deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px), repeating-linear-gradient(180deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px), repeating-linear-gradient(270deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px),'.substring(0,1) + togglefrom.replace(/\.gif/g,'.JUNKgif'));
defstyle=defstyle.replace(toggleto, snapshot(' repeating-linear-gradient(0deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px), repeating-linear-gradient(90deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px), repeating-linear-gradient(180deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px), repeating-linear-gradient(270deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px),'.substring(0,1) + togglefrom.replace(/\.gif/g,'.JUNKgif'))); // + ' 30 round');
defstyle=defstyle.replace(lasttoggleto, snapshot(' repeating-linear-gradient(0deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px), repeating-linear-gradient(90deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px), repeating-linear-gradient(180deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px), repeating-linear-gradient(270deg, #333333, #333333 10px, transparent 10px, transparent 20px, #333333 20px),'.substring(0,1) + lasttogglefrom.replace(/\.gif/g,'.JUNKgif'))); // + ' 30 round');
document.head.innerHTML+=defstyle;
nogolist+=susslist;
susslist=',';
lasttto='';
lasttmid='';
lasttfrom='';
lasttoggleto='';
lasttogglefrom='';
lastcard='';
lasttogglenumber='';
}
susslist=',';
}
function pa() {
if (aminmiddle) {
if (1 == 2) { setTimeout(pa, 10000); }
return false;
}
if ('document.hasFocus()' == 'document.hasFocus()' && card_game.toLowerCase() != ulgame('500ish')) {
//if (card_game.toLowerCase() == '500ish') { overallgoes=curdrag; }
console.log(('' + opltlistl[eval('' + cw)]) + ' dragorderbig[' + curdrag + ']=' + dragorderbig[eval('' + curdrag)] + ' vs cw=' + cw + ' and overallgoes=' + overallgoes);
if ((('' + opltlistl[eval('' + cw)]).split('.')[1] == ('' + dragorderbig[eval('' + curdrag)]) && eval('' + curdrag) == eval('' + overallgoes))) {
console.log('Dragorderbig[' + curdrag + ']=' + dragorderbig[eval('' + curdrag)] + ' vs cw=' + cw + ' and overallgoes=' + overallgoes);
ps=documenttitle.split('/')[0].trim();
pg=documenttitle.split('/')[1].split(' ')[0];
if (ps.indexOf('.') == -1 || pg.indexOf('.') == -1) {
ps=eval('' + overallscore + '.' + psecs); //eval(documenttitle.split('/')[0].trim());
pg=eval('' + overallgoes + '.' + secs);
documenttitleeq(documenttitle.replace(documenttitle.split(' ')[0], '' + overallscore + '.' + psecs + '/' + '' + overallgoes + '.' + secs));
console.log('documenttitle becomes ' + documenttitle);
} else {
ps=eval(ps);
pg=eval(pg);
}
var decs=documenttitle.split('.');
curdrag++;
psecs++;
overallgoes++;
if (eval('' + decs.length) >= 3) {
documenttitleeq(documenttitle.replace('.' + decs[1] + '.', '.' + curdrag + '/' + overallgoes + '.'));
}
if (!nominal_numplayers) {
defstyle=defstyle.replace(cards[donelist[eval('' + cw)]].split('#')[0].split('gif')[0], cards[donelist[eval('' + cw)]].split('#')[0].split('gif')[0] + 'JUNK');
document.head.innerHTML+=defstyle;
}
//oplist[eval('' + tw)].close();
return null;
}
aminmiddle=true;
var hj=prompt(dp + blurb(), def);
if (hj) {
//setTimeout(function() { hj=prompt(dp + blurb(), def); if (hj == null) { hj=''; } else { hj=assess(hj); } if (hj.replace(def,'') != '') { checka(hj); } else if (1 == 2) { setTimeout(pa,10000); } aminmiddle=false; }, 8000);
if (hj == null) {
hj='';
} else {
hj=assess(hj);
}
if (hj.replace(def,'') == '') {
if (1 == 2) { setTimeout(pa,1000); }
} else {
checka(hj);
}
} else if (1 == 2) {
setTimeout(pa,1000);
}
aminmiddle=false;
//examinescore();
}
}
function checka(tpa) {
console.log('documenttitle=' + documenttitle + ' and tpa=' + tpa);
os='';
console.log('documenttitle=' + documenttitle + ' and tpa=' + tpa);
if (1 == 5) {
if (huh(oplist[0])) {
ps=eval(documenttitle.split('/')[0].trim());
pg=eval(documenttitle.split('/')[1].split(' ')[0]);
} else {
ps=documenttitle.split('/')[0].trim();
pg=documenttitle.split('/')[1].split(' ')[0];
if (ps.indexOf('.') == -1 || pg.indexOf('.') == -1) {
ps=eval('' + overallscore + '.' + psecs); //eval(documenttitle.split('/')[0].trim());
pg=eval('' + overallgoes + '.' + secs);
documenttitleeq(documenttitle.replace(documenttitle.split(' ')[0], '' + overallscore + '.' + psecs + '/' + '' + overallgoes + '.' + secs));
console.log('documenttitle becomes ' + documenttitle + ' and tpa=' + tpa);
} else {
ps=eval(ps);
pg=eval(pg);
}
}
}
force=true;
if (('' + ps) == '') { ps='0'; }
if (('' + pg) == '') { pg='0'; }
if (tpa.trim().toLowerCase() == da.toLowerCase()) {
ps++;
os=tpa.split(da)[1];
if (os == '' || 1 == 1) {
//overallscore++;
//overallgoes++;
console.log('Os=' + os + 'dt=' + '' + ('' + ps).split('.')[0] + os + '/' + '' + ('' + pg).split('.')[0] + ' is User Score/Goes');
documenttitleeq('' + '' + ('' + ps).split('.')[0] + os + '/' + '' + ('' + pg).split('.')[0] + ' is User Score/Goes');
}
} else {
pg++;
os=tpa.split(tpa.trim())[1];
if (os == '' || 1 == 1) {
//overallgoes++;
console.log('os=' + os + 'dt=' + '' + ('' + ps).split('.')[0] + os + '/' + ('' + pg).split('.')[0] + ' is User Score/Goes');
documenttitleeq('' + ('' + ps).split('.')[0] + os + '/' + ('' + pg).split('.')[0] + ' is User Score/Goes');
}
}
if (tpa != '') {
if (!nominal_numplayers) {
defstyle=defstyle.replace(cards[donelist[eval('' + cw)]].split('#')[0].split('gif')[0], cards[donelist[eval('' + cw)]].split('#')[0].split('gif')[0] + 'JUNK');
document.head.innerHTML+=defstyle;
}
}
if (!nominal_numplayers) {
examinescore();
}
}
function threetoone(threeis) {
var suitis=('' + threeis).slice(-1).toLowerCase();
var crdis=('' + threeis).substring(0,2);
if (crdis == '11' && trumpsare != '0' && card_game.toLowerCase() != 'bridge') {
if (trumpsare.replace('c','s') == 's' && suitis.replace('c','s') == 's' && suitis != trumpsare) {
//alert('right bower played as ' + suitis.replace('c','S').replace('s','C').toLowerCase());
return suitis.replace('c','S').replace('s','C').toLowerCase();
} else if (trumpsare.replace('h','d') == 'd' && suitis.replace('h','d') == 'd' && suitis != trumpsare) {
//alert('Right bower played as ' + suitis.replace('h','D').replace('d','H').toLowerCase());
return suitis.replace('h','D').replace('d','H').toLowerCase();
}
}
return suitis.toLowerCase().replace('0', trumpsare);
}
function lessmaybeno(xxcw) {
var allowthrough=gallow, fnd=false, fnds=[], ifnds=0;
csuffix='';
//if (nogolist.indexOf(',' + xxcw + ',') != -1) { if (card_game.toLowerCase() == '500ish') { console.log('oops'); } return '1234567'; }
//alert('thishand.length=' + thishand.length);
if (thishand.length != 0 && card_game.toLowerCase() == ulgame('500ish')) {
//alert('here');
//if (!allowthrough) { alert('RE ' + ysuffs[eval(-1 + eval('' + curplayer))] + ' ... lead with ' + thishand[0].slice(-1).toLowerCase() + ' and you played ' + hands[eval(0 + xxcw)].slice(-1).toLowerCase()); }
if (!allowthrough && threetoone(thishand[0].slice(-3).toLowerCase()) != threetoone(hands[eval(0 + xxcw)].slice(-3).toLowerCase())) {
fnds=ysuffs[eval(-1 + eval('' + curplayer))].substring(1).split(' ');
for (ifnds=0; ifnds<fnds.length; ifnds++) {
if (fnds[ifnds].indexOf(',') != -1) {
//if joker and trumpsare is lead, relax
//if right bower and trumpsare is lead, relax
if (fnds[ifnds].toLowerCase().indexOf(threetoone(thishand[0].slice(-3).toLowerCase())) != -1) { fnd=true; }
}
}
if (fnd) {
if (eval('' + emailsms.length) >= eval('' + curplayer)) { if (('' + emailsms[eval('' + curplayer)]).trim() != '') { csuffix=' Will resend last email if you cancel this play.'; } }
if (lastconf != xxcw) { allowthrough=confirm('You could follow suit (where trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '), Player ' + clong(curplayer) + '! Allow through anyway?' + csuffix); }
if (!allowthrough) { if (1 == 11) { alert('false'); } lastiourx=-1; lastioury=-1; lastconf='' + xxcw; if (eval('' + emailsms.length) >= eval('' + curplayer)) { retcom(pmesg, pretv); } return '1234568'; } else { if (1 == 11) { alert('true'); } lastiourx=iourx; lastioury=ioury; lastconf=''; setTimeout(lastixy,2000); }
}
}
}
return xxcw;
}
function lastixy() {
lastiourx=-1; lastioury=-1;
}
function maybeno(xxcw) {
var allowthrough=gallow, fnd=false, fnds=[], ifnds=0;
csuffix='';
if (nogolist.indexOf(',' + xxcw + ',') != -1) { if (card_game.toLowerCase() == ulgame('500ish')) { console.log('oops'); } return '1234567'; }
//alert('thishand.length=' + thishand.length);
if (thishand.length != 0 && card_game.toLowerCase() == ulgame('500ish')) {
//alert('here');
//if (!allowthrough) { alert('RE ' + ysuffs[eval(-1 + eval('' + curplayer))] + ' ... lead with ' + thishand[0].slice(-1).toLowerCase() + ' and you played ' + hands[eval(0 + xxcw)].slice(-1).toLowerCase()); }
if (!allowthrough && threetoone(thishand[0].slice(-3).toLowerCase()) != threetoone(hands[eval(0 + xxcw)].slice(-3).toLowerCase())) {
fnds=ysuffs[eval(-1 + eval('' + curplayer))].substring(1).split(' ');
for (ifnds=0; ifnds<fnds.length; ifnds++) {
if (fnds[ifnds].indexOf(',') != -1) {
//if joker and trumpsare is lead, relax
//if right bower and trumpsare is lead, relax
if (fnds[ifnds].toLowerCase().indexOf(threetoone(thishand[0].slice(-3).toLowerCase())) != -1) { fnd=true; }
}
}
if (fnd) {
if (eval('' + emailsms.length) >= eval('' + curplayer)) { if (('' + emailsms[eval('' + curplayer)]).trim() != '') { csuffix=' Will resend last email if you cancel this play.'; } }
allowthrough=confirm('You could follow suit (where trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '), Player ' + clong(curplayer) + '! Allow through anyway?' + csuffix);
if (!allowthrough) { if (1 == 11) { alert('False'); } if (eval('' + emailsms.length) >= eval('' + curplayer)) { retcom(pmesg, pretv); } return '1234568'; } else { if (1 == 11) { alert('True'); } }
}
}
}
return xxcw;
}
function bpmore(incss) {
var thirty=30;
var cgcols=['lime','maroon','lightblue','purple','lightgray','teal','fuchsia','olive','red','lightgreen','darkorange','pink','orange','yellow'];
if (card_game.toLowerCase() == ulgame('500ish')) {
cgcols=["rgba(0,255,0,0.1)","rgba(173,216,230,0.1)","rgba(211,211,211,0.1)","rgba(255,0,255,0.1)","rgba(144,238,144.0.1)","rgba(255,192,203,0.1)","rgba(255,165,0,0.1)","rgba(255,255,0,0.1)"];
}
var icg=eval(0 + Math.floor(Math.random() * cgcols.length));
var mvt=eval(10 + Math.floor(Math.random() * 40));
var kf=" @keyframes animatedBpos { from { background-position: bp1; } to { background-position: bp2; } } ";
var inkf="", jnkf="", jnkfd="", nn=0;
var inks=[];
if (card_game.toLowerCase() == 'bridge') { var ghfd=incss.split('3.13'); if (ghfd.length == 3) { incss=incss.replace('3.13' + ghfd[2], '4.13' + ghfd[2]); } ghfd=defstyle.split('3.13'); if (ghfd.length == 3) { defstyle=defstyle.replace('3.13' + ghfd[2], '4.13' + ghfd[2]); } }
if (card_game.toLowerCase() == ulgame('500ish')) { thirty=1; mvt=1; }
if (incss.indexOf('} </style>') != -1) {
if (incss.indexOf('background-position:') != -1) {
inkf=incss.split('background-position:')[1].split(';')[0].trim();
inks=inkf.split(',');
for (nn=0; nn<inks.length; nn++) {
if (('' + inks[nn]).indexOf(' ') != -1) {
if (('' + inks[nn]).indexOf('px') != -1) {
jnkf+=jnkfd + eval(mvt + eval('' + inks[nn].replace(/px/g,'').replace(/\%/g,'').split(' ')[0])) + 'px ' + eval(thirty + eval('' + inks[nn].replace(/px/g,'').replace(/\%/g,'').split(' ')[1])) + 'px';
} else {
jnkf+=jnkfd + eval(mvt + eval('' + inks[nn].replace(/px/g,'').replace(/\%/g,'').split(' ')[0])) + '% ' + eval(thirty + eval('' + inks[nn].replace(/px/g,'').replace(/\%/g,'').split(' ')[1])) + '%';
}
} else {
jnkf+=jnkfd + inks[nn];
}
jnkfd=',';
}
if (card_game == ulgame('500ISH')) { if (!in_bidding) { if (eval('' + emailsms.length) > eval(-1 + eval('' + curplayer))) { if (emailsms[eval(-1 + eval('' + curplayer))].indexOf('@') != -1) { incss=incss.replace('Click away ', 'Click (via email) away '); } else if (emailsms[eval(-1 + eval('' + curplayer))].trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') { incss=incss.replace('Click away ', 'Click (via SMS) away '); } } } if (in_bidding) { incss=incss.replace('Click away ', 'Bid away '); } if (card_game.toLowerCase() != 'bridge') { incss=incss.replace(/1\.11\ \?n\=[^<]*\</g,'<').replace(/2\.11\ \?n\=[^<]*\</g,'<').replace(/3\.11\ \?n\=[^<]*\</g,'<'); } }
if (incss.indexOf('} @keyframes ') != -1) {
return sff(incss.replace(/\ \?n\=[^<]*\</g,'<').replace('yellow',cgcols[icg]).replace('} @keyframes ', ' animation: animatedBpos 10s linear infinite; }' + kf.replace('bp1', inkf).replace('bp2', jnkf) + ' @keyframes '),curplayer);
} else {
return sff(incss.replace(/\ \?n\=[^<]*\</g,'<').replace('yellow',cgcols[icg]).replace('} </style>', ' animation: animatedBpos 10s linear infinite; }' + kf.replace('bp1', inkf).replace('bp2', jnkf) + ' } </style>'),curplayer);
}
}
}
return sff(incss.replace(/\ \?n\=[^<]*\</g,'<'),curplayer);
}
function myalertwt(wh) {
var stitle='';
if (lastwinner == lastwinner) {
//curplayer=lastwinner;
if (thehand.replace(',','') != '' && 1 == 1) {
emstuff='';
wemstuff='';
wemstuffx='';
//alert(thehand);
var thbits=('' + thehand).split(',');
for (var ith=0; ith<thbits.length; ith++) {
if (thbits[ith] != '') {
for (var jth=0; jth<spcps.length; jth++) {
if (spcps[jth].indexOf(thbits[ith].slice(-3) + '.') != -1) {
stitle=' title="Played card ' + spcps[jth].split('.')[0].slice(-3).substring(0,2).toLowerCase().replace('00','Joker aka ').replace('01','Ace of ').replace('02','Two of ').replace('03','Three of ').replace('04','Four of ').replace('05','Five of ').replace('06','Six of ').replace('07','Seven of ').replace('08','Eight of ').replace('09','Nine of ').replace('10','Ten of ').replace('11','Jack of ').replace('12','Queen of ').replace('13','King of ') + spcps[jth].split('.')[0].slice(-1).replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '" ';
emstuff+=' ' + wemst(String.fromCodePoint(eval('' + spcps[jth].split('/')[0])), eval(1 + eval('' + ith)), thbits.length, eval('' + spcps[jth].split('/')[0]), jth, stitle);
}
}
}
}
}
curplayer=lastwinner;
console.log('dolaterz ' + wh);
dolaterz(wh + ' ... Player ' + curplayer + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)])); //myalertmc(wh + ' ... Player ' + curplayer + ' cards are ... ' + zsuffs[eval(-1 + curplayer)]);
}
}
function wemst(inem, thisinhand, totinhand, sfcpi, sfi, stit) {
var thiscr=eval('' + curplayer);
var aspace='';
if (spcps[eval('' + sfi)].slice(-5).substring(0,1).toLowerCase().replace('h','d') == 'd') {
aspace=' ';
}
for (var ibnm=totinhand; ibnm>thisinhand; ibnm--) {
thiscr--;
if (thiscr == 0) { thiscr=eval('' + nominal_numplayers); }
}
if (eval('' + emailsms.length) > eval(-1 + thiscr)) {
if (emailsms[eval(-1 + thiscr)].trim() != '') {
wemstuff+=' ' + sef(emailsms[eval(-1 + thiscr)], eval(-1 + thiscr)) + ' - ' + aspace + inem + aspace + aspace;
wemstuffx+=' ' + sef(emailsms[eval(-1 + thiscr)], eval(-1 + thiscr)) + ' <span ' + stit.trim() + '>-</span> ' + aspace + antiinem(inem) + aspace + aspace;
} else {
wemstuff+=' ' + pnames[eval(-1 + thiscr)] + ' - ' + aspace + inem + aspace + aspace;
wemstuffx+=' ' + pnames[eval(-1 + thiscr)] + ' <span ' + stit.trim() + '>-</span> ' + aspace + antiinem(inem) + aspace + aspace;
}
} else {
wemstuff+=' ' + pnames[eval(-1 + thiscr)] + ' - ' + aspace + inem + aspace + aspace;
wemstuffx+=' ' + pnames[eval(-1 + thiscr)] + ' <span ' + stit.trim() + '>-</span> ' + aspace + antiinem(inem) + aspace + aspace;
}
return inem;
}
function antiinem(inm) {
var ks=232;
for (var js=-1; js<spcps.length; js++) {
if (js >= 0) { ks=eval(('' + spcps[js]).split('/')[0]); }
while (inm.indexOf(String.fromCodePoint(ks)) != -1) {
inm=inm.replace(String.fromCodePoint(ks), '' + ks + ';');
}
}
return inm;
}
function tabord(indivhtml) {
var ilook=0, jlook=1, klook=0, cbidfound='SUBMIT', tdyellow='', stylenone='', stylentwo='';
var slookfor=[' data-suit=s', ' data-suit=c', ' data-suit=d', ' data-suit=h'];
var sofaris='';
var slooks=[];
var outdivhtml='<br><style> isyellow { background-color:yellow; } </style><table border=2><thead></thead><tbody></tbody></table>'
if (in_bidding) {
twentythree=30;
//outdivhtml=outdivhtml.replace('</tbody>', '<tr><td>Bidding<br>Current Bid: ' + cbid + '<td><input type=SUBMIT name=myanswer value="pass "></input></td></TR></tbody>');
if (1 == 5) {
if (cbid.replace('None','pass') != '' && card_game.toUpperCase() == 'BRIDGE' && doublefactor == 1 && passcnt == 0) {
sdsn="";
rdsn=" style='display:none;'";
} else if (cbid.replace('None','pass') != '' && card_game.toUpperCase() == 'BRIDGE' && doublefactor == 2 && passcnt == 0) {
rdsn="";
sdsn=" style='display:none;'";
} else {
sdsn=" style='display:none;'";
rdsn=" style='display:none;'";
}
}
if (in_kitty) {
console.log('tds_kitty=' + tds_kitty);
outdivhtml=outdivhtml.replace('</tbody>', tds_kitty + '</tbody>'); //.replace('</thead>','</THEAD>');
outdivhtml=outdivhtml.replace('</tbody>', '<tr id=trbid><td>Bidding<br>Your Current Bid: None<td><input type=' + cbidfound + ' name=myanswer value="pass "></input><input' + dsdn + ' type=' + cbidfound + ' name=myanswer value="double "></input><input' + rsdn + ' type=' + cbidfound + ' name=myanswer value="redouble "></input></td></TR></tbody>');
} else {
outdivhtml=outdivhtml.replace('</tbody>', '<tr id=trbid><td>Bidding<br>Current Bid: None<td><input type=' + cbidfound + ' name=myanswer value="pass "></input><input' + dsdn + ' type=' + cbidfound + ' name=myanswer value="double "></input><input' + rsdn + ' type=' + cbidfound + ' name=myanswer value="redouble "></input></td></TR></tbody>');
}
if (cbid.toLowerCase().trim().replace('pass','none').replace('none','') != '') { cbidfound='button'; stylentwo=' style=display:none;'; }
twentythree--;
twentythree--;
for (klook=0; klook<bids.length; klook++) {
if (bids[klook].toLowerCase().trim() == cbid.toLowerCase().trim()) { stylentwo=''; tdyellow=' title="Current leading bid by Player ' + cbidby + '" class=isyellow'; }
if (bids[klook].indexOf('open') == 0 && 1 == 9) { // allow through open misere
outdivhtml=outdivhtml.replace('</TR>', '<td' + stylentwo + tdyellow + '><input title="Scores plus or minus ' + drb(sbid[klook]) + '" style=display:none; type=' + cbidfound + ' name=myanswer value="' + bids[klook].replace(String.fromCodePoint(232), 'è').replace('open_', 'open ').replace(String.fromCodePoint(232), 'è').replace('open_', 'open ') + '"></input></td></TR>');
} else if (bids[klook].slice(-1).replace('h','d') == 'd') {
outdivhtml=outdivhtml.replace('</TR>', '<td' + stylentwo + tdyellow + '><input title="Scores plus or minus ' + drb(sbid[klook]) + '" style="font-color:red;color:red" type=' + cbidfound + ' name=myanswer value="' + bids[klook].replace(String.fromCodePoint(232), 'è').replace('open_', 'open ').replace(String.fromCodePoint(232), 'è').replace('open_', 'open ') + ' "></input></td></TR>');
} else {
//alert(bids[klook].replace(String.fromCodePoint(232), 'è').replace('open_', 'open ').replace(String.fromCodePoint(232), 'è').replace('open_', 'open '));
outdivhtml=outdivhtml.replace('</TR>', '<td' + stylentwo + tdyellow + '><input title="Scores plus or minus ' + drb(sbid[klook]) + '" type=' + cbidfound + ' name=myanswer value="' + bids[klook].replace(String.fromCodePoint(232), 'è').replace('open_', 'open ').replace(String.fromCodePoint(232), 'è').replace('open_', 'open ') + ' "></input></td></TR>');
}
if (bids[klook].toLowerCase().trim() == cbid.toLowerCase().trim()) { cbidfound='SUBMIT'; stylentwo=''; }
twentythree--;
tdyellow='';
}
//outdivhtml=outdivhtml.replace('</TR>', '<td colspan=' + twentythree + '></td></tr><tr><td colspan=10>500 Card Game Player' + eval('' + bidplayer) + ' Name: <input type=text name=myname value="' + pnames[eval(-1 + bidplayer)] + '"></input></td><td colspan=20 style=text-align:center;>... relevant to your cards below ...</td></tr>' + tds_kitty).replace('</thead>','</THEAD>');
outdivhtml=outdivhtml.replace('</TR>', '<td colspan=' + twentythree + '></td></tr><tr><td colspan=10>500 Card Game Player' + eval('' + bidplayer) + ' Name: <input title="' + wsuffs[eval(-1 + bidplayer)].split('' + bidplayer + doteleven)[0] + '" type=text name=myname value="' + pnames[eval(-1 + bidplayer)] + '"></input></td><td colspan=20 style=text-align:center;>... relevant to your cards below ...</td></tr>').replace('</thead>','</THEAD>');
} else if (in_kitty) {
//alert('in_kitty=t ' + tds_kitty + ' ... ' + outdivhtml);
console.log('Tds_kitty=' + tds_kitty);
outdivhtml=outdivhtml.replace('</tbody>', tds_kitty + '</tbody>').replace('</thead>','</THEAD>');
}
for (ilook=0; ilook<slookfor.length; ilook++) {
slooks=(indivhtml + ' <input ').split(slookfor[ilook]);
if (in_bidding && !in_kitty) {
for (jlook=0; jlook<slooks.length; jlook++) {
slooks[jlook]=slooks[jlook].replace('>:','><br>').replace(/submit/g,'button').replace(/\ href\=/g,' data-href=').replace(/background\-color\:yellow\;/g,'').replace(/background\-color\:lightgreen\;/g,'').replace(/border\:5px\ solid\ yellow\;/g,'');
}
}
twentythree=30;
outdivhtml=outdivhtml.replace('</tbody>', '<tr><td>' + slookfor[ilook].replace(' data-suit=','').replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '</td></TR></tbody>');
twentythree--;
for (jlook=1; jlook<slooks.length; jlook++) {
if (sofaris.indexOf(slooks[jlook].split(' <input ')[0].replace('>:','><br>')) == -1) {
sofaris+=slooks[jlook].split(' <input ')[0].replace('>:','><br>');
outdivhtml=outdivhtml.replace('</TR>', '<td> <input' + slooks[jlook].split(' <input ')[0].replace('>:','><br>') + '</td></TR>');
twentythree--;
}
}
outdivhtml=outdivhtml.replace('</TR>', '<td colspan=' + twentythree + '></tr>');
}
//alert(outdivhtml);
//in_kitty=false;
outdivhtml=outdivhtml.replace(/Spades/g, 'Spades<br> ' + nominalemojisuit('s')).replace(/Clubs/g, 'Clubs<br> ' + nominalemojisuit('c')).replace(/Hearts/g, 'Hearts<br> <font color=red>' + nominalemojisuit('h') + '</font>').replace(/Diamonds/g, 'Diamonds<br> <font color=red>' + nominalemojisuit('d') + '</font>');
for (ilook=0; ilook<bids.length; ilook++) {
if (outdivhtml.indexOf(bids[ilook].trim() + ' ') != -1) {
switch(bids[ilook].trim().slice(-1)) {
case 's':
outdivhtml=outdivhtml.replace(bids[ilook].trim() + ' ', bids[ilook].trim() + ' ' + nominalemojisuit('s'));
break;
case 'c':
outdivhtml=outdivhtml.replace(bids[ilook].trim() + ' ', bids[ilook].trim() + ' ' + nominalemojisuit('c'));
break;
case 'd':
outdivhtml=outdivhtml.replace(bids[ilook].trim() + ' ', bids[ilook].trim() + ' ' + nominalemojisuit('d') + '');
break;
case 'h':
outdivhtml=outdivhtml.replace(bids[ilook].trim() + ' ', bids[ilook].trim() + ' ' + nominalemojisuit('h'));
break;
default:
break;
}
}
}
var odvs=outdivhtml.split('</a>');
var thisais='';
for (var iodvs=0; iodvs<odvs.length; iodvs++) {
thisais=odvs[iodvs].split('>')[eval(-1 + odvs[iodvs].split('>').length)];
if (thisais.indexOf(' ') != -1) {
outdivhtml=outdivhtml.replace('>' + thisais + '</a>', '>' + thisais.split(' ')[0] + '</a>');
}
}
var ks=232;
for (var js=-1; js<spcps.length; js++) {
if (js >= 0) { ks=eval(('' + spcps[js]).split('/')[0]); }
while (outdivhtml.indexOf(String.fromCodePoint(ks)) != -1) {
outdivhtml=outdivhtml.replace(String.fromCodePoint(ks), '' + ks + ';');
}
}
if ((!in_bidding || in_kitty) && eval('' + omc) >= 0) {
if (('' + hsuffs[eval(-1 + omc)]).replace('null','').indexOf('<table') != -1 && eval('' + curplayer) != eval('' + omc)) {
var hwa=hsuffs[eval(-1 + omc)];
while (hwa.indexOf('submit') != -1) {
hwa=hwa.replace('submit','BUTTON');
}
while (hwa.indexOf('SUBMIT') != -1) {
hwa=hwa.replace('SUBMIT','BUTTON');
}
outdivhtml=outdivhtml.replace('</table>', '</table><br><p>And here are the cards of the Open player ' + sef(emailsms[eval(-1 + omc)], eval(-1 + omc)) + ' ...</p><br><table' + hwa.split('<table')[1].split('</table>')[0].replace(/\<tr\ id\=/g, '<tr style=display:none; id=').replace(/\ href\=/g,' data-href=').replace('... relevant to your cards below ...','') + '</table></body>');
} else if (('' + hsuffs[eval(-1 + omc)]).replace('null','').indexOf('<table') != -1) {
outdivhtml=outdivhtml.replace('</table>', '</table><br><p>And here are the cards of the Open player ' + sef(emailsms[eval(-1 + omc)], eval(-1 + omc)) + ' that we have emailed also to your partner and lead bidder ' + sef(emailsms[eval(-1 + omh)], eval(-1 + omh)) + ' ... ' + antiinem(zsuffs[eval(-1 + omc)]) + '</p></body>');
}
}
if (thehand.replace(',','') == '' && curplayer == lastwinner) {
return outdivhtml.replace(/\ class\=isyellow/g, ' class=isyellow style=background-color:yellow;').replace('<thead></thead>', '<thead><td colspan=' + twentythree + '>500 Card Game Player' + eval('' + curplayer) + ' Name: <input title="' + wsuffs[eval(-1 + curplayer)].split('' + curplayer + doteleven)[0] + '" type=text name=myname value="' + pnames[eval(-1 + curplayer)] + '"></input><br> ' + sss.replace(/h\ \ /g,'h <font color=red>').replace(/\ \ /g,'</font>').replace(/d\ \ /g,'d <font color=red>').replace(/\ \ /g,'</font>').replace(/h\<\/font\>/g,'h <font color=red>').replace(/d\<\/font\>/g,'d <font color=red>') + '<br> for Trick ' + tricknumber + ' (you lead off after) Last Trick ' + eval(-1 + tricknumber) + ' (you won) ... ' + wemstuffx.replace(/\-\ \ /g, '- <font color=red>').replace(/\>\ \ /g, '> <font color=red>').replace(/\ \ /g, '</font>') + '</td></tr></thead>');
} else if (thehand.replace(',','') == '' && curplayer != lastwinner) {
return outdivhtml.replace(/\ class\=isyellow/g, ' class=isyellow style=background-color:yellow;').replace('<thead></thead>', '<thead><td colspan=' + twentythree + '>500 Card Game Player' + eval('' + curplayer) + ' Name: <input title="' + wsuffs[eval(-1 + curplayer)].split('' + curplayer + doteleven)[0] + '" type=text name=myname value="' + pnames[eval(-1 + curplayer)] + '"></input><br> ' + sss.replace(/h\ \ /g,'h <font color=red>').replace(/\ \ /g,'</font>').replace(/d\ \ /g,'d <font color=red>').replace(/\ \ /g,'</font>').replace(/h\<\/font\>/g,'h <font color=red>').replace(/d\<\/font\>/g,'d <font color=red>') + '<br> for Last Trick ' + eval(-1 + tricknumber) + ' (' + sef(emailsms[eval(-1 + lastwinner)], eval(-1 + lastwinner)) + ' won) ... ' + wemstuffx.replace(/\-\ \ /g, '- <font color=red>').replace(/\>\ \ /g, '> <font color=red>').replace(/\ \ /g, '</font>') + '</td></tr></thead>');
}
return outdivhtml.replace(/\ class\=isyellow/g, ' class=isyellow style=background-color:yellow;').replace('<thead></thead>', '<thead><td colspan=' + twentythree + '>500 Card Game Player' + eval('' + curplayer) + ' Name: <input title="' + wsuffs[eval(-1 + curplayer)].split('' + curplayer + doteleven)[0] + '" type=text name=myname value="' + pnames[eval(-1 + curplayer)] + '"></input><br> ' + sss.replace(/h\ \ /g,'h <font color=red>').replace(/\ \ /g,'</font>').replace(/d\ \ /g,'d <font color=red>').replace(/\ \ /g,'</font>').replace(/h\<\/font\>/g,'h <font color=red>').replace(/d\<\/font\>/g,'d <font color=red>') + '<br> for Trick ' + tricknumber + ' (progress so far) ... ' + wemstuffx.replace(/\-\ \ /g, '- <font color=red>').replace(/\>\ \ /g, '> <font color=red>').replace(/\ \ /g, '</font>') + '</td></tr></thead>');
}
function inhouse(inhref) {
var ine=inhref.split('mailto:')[1].split('?')[0];
var dprefix='';
var byis='';
var spare='';
var wasy='';
var aprefix=document.URL.split('?')[0].split('#')[0] + '?gamedate=' + encodeURIComponent('' + dis) + '&myanswer=';
if (ine.toLowerCase() == ine) {
form = new FormData();
xhr = new XMLHttpRequest();
form.append('to', ine);
if ((!in_bidding && !in_kitty) && eval('' + omc) >= 0) {
if (fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).indexOf('@') != -1 && fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() == fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
form.append('cc', fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))));
} else if (fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).indexOf('@') != -1 && fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() != fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
mailtos.push(inhref.replace(ine, fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))));
} else if (fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).trim() != '' && fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') { // && fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() != fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
smss.push(inhref.replace('mailto:','sms:').replace('?' + inhref.split('?')[1].split('&body=')[0],'').replace(ine, fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))));
}
} else {
//alert('INTO ' + curplayer);
if (fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).indexOf('@') != -1 && fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() == fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
//alert('IN ' + curplayer);
form.append('cc', fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))));
} else if (fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).indexOf('@') != -1 && fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() != fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
mailtos.push(inhref.replace(ine, fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))));
} else if (fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).trim() != '' && fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') { // && fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() != fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
smss.push(inhref.replace('mailto:','sms:').replace('?' + inhref.split('?')[1].split('&body=')[0],'').replace(ine, fes(ccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))));
}
}
if (eval('' + curplayer) == eval('' + omc)) {
if (fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh))).indexOf('@') != -1 && fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh))) == fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh))).toLowerCase()) {
form.append('bcc', fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh))));
} else if (fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh))).indexOf('@') != -1 && fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh))) != fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh))).toLowerCase()) {
mailtos.push(inhref.replace(ine, fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh)))));
} else if (fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh))).trim() != '' && fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh))).trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') { // && fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() != fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
smss.push(inhref.replace('mailto:','sms:').replace('?' + inhref.split('?')[1].split('&body=')[0],'').replace(ine, fes(emailsms[eval(-1 + omh)],eval(-1 + eval('' + omh)))));
}
}
if (fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).indexOf('@') != -1 && fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() == fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
form.append('bcc', fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))));
} else if (fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).indexOf('@') != -1 && fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() != fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
mailtos.push(inhref.replace(ine, fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))));
} else if (fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).trim() != '' && fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).trim().replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') { // && fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))).toLowerCase() != fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))) {
smss.push(inhref.replace('mailto:','sms:').replace('?' + inhref.split('?')[1].split('&body=')[0],'').replace(ine, fes(bccnames[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))));
}
form.append('inline', 'y');
var subjis=efs(decodeURIComponent(inhref.split('subject=')[1].split('&')[0].split('#')[0]).replace(/\<font\ color\=red\>/g,'').replace(/\<\/font\>/g,''),bidplayer).replace(String.fromCodePoint(232), 'è').replace('open_', 'open ').replace(String.fromCodePoint(232), 'è').replace('open_', 'open ');
if (in_bidding) {
if (ssuffs[eval(-1 + bidplayer)] == '') { ssuffs[eval(-1 + bidplayer)]=subjis; } else { subjis=ssuffs[eval(-1 + bidplayer)]; }
if (in_kitty) {
subjis=subjis.replace('Bidding ', 'Kitty and Bidding ');
}
}
var sjs=subjis.split('Bidding proceeds after last ');
if (eval('' + sjs.length) != 1) {
wasy=subjis.split('Bidding proceeds after last ')[1].split(' ')[0];
subjis=sjs[0] + 'Bidding proceeds after last ' + cbid + ' ' + subjis.split('Bidding proceeds after last ' + wasy + ' ')[1];
//alert('0:' + subjis);
}
sjs=subjis.split('Winning bid in this 500 card game is ');
if (eval('' + sjs.length) != 1) {
wasy=subjis.split('Winning bid in this 500 card game is ')[1].split(' ')[0];
subjis=sjs[0] + 'Winning bid in this 500 card game is ' + cbid + ' ' + subjis.split('Winning bid in this 500 card game is ' + wasy + ' ')[1];
//alert('1:' + subjis);
}
if ((!in_bidding && !in_kitty) && eval('' + omc) >= 0) {
spare=subjis;
if (('' + curplayer) == ('' + omc) && spare.indexOf('Winning bid in ') != -1) {
subjis=spare.replace('Winning bid in ', 'Winning bid open hand in ');
}
}
if ((!in_bidding && !in_kitty) && ((cbid + ' ').substring(0,3).toLowerCase() == 'mis' || eval('' + omc) >= 0)) {
spare=subjis;
if ((('' + curplayer) == ('' + omc) || ('' + curplayer) == ('' + omh) || ('' + curplayer) == ('' + cbidby)) && (spare.indexOf('Congratulations') == 0)) {
subjis='Opposite of ' + spare.substring(eval('' + spare.indexOf('Congratulations')));
} else if ((('' + curplayer) == ('' + omc) || ('' + curplayer) == ('' + omh) || ('' + curplayer) == ('' + cbidby)) && (spare.indexOf('Bad luck') == 0)) {
subjis='Good luck is ' + spare.substring(eval('' + spare.indexOf('Bad luck')));
} else if ((('' + curplayer) != ('' + omc) && ('' + curplayer) != ('' + omh) && eval('' + omc) >= 0) && (spare.indexOf('Congratulations') == 0)) {
subjis='Sad news about ' + spare.substring(eval('' + spare.indexOf('Congratulations')));
} else if ((('' + curplayer) != ('' + cbidby) && eval('' + omc) < 0) && (spare.indexOf('Congratulations') == 0)) {
subjis='Sad news about ' + spare.substring(eval('' + spare.indexOf('Congratulations')));
}
}
subjis=subjis.replace('è', String.fromCodePoint(232)).replace('open_', 'open ').replace('è', String.fromCodePoint(232)).replace('open_', 'open ');
if (emstuff != '') {
form.append('subject', afterss + efs(subjis,curplayer) + ' ... Trick so far is ' + wemstuff + ' and Score is ' + oraass(scoresuffix));
} else {
form.append('subject', afterss + efs(subjis,curplayer));
}
var indef=decodeURIComponent(inhref.split('body=')[1].split('&')[0].split('#')[0] + "%20");
console.log('indef=' + indef);
//alert('indef=' + indef);
var indefs=indef.split(' and the open hand ')[0].split(':'), changefrom='', changeto='';
//if (inhref.indexOf('Congratulations') != -1) { alert("0:indefs[0].slice(-12)=" + indefs[0].slice(-12) + " and indef=" + indef); }
var data_suit='';
var thispcard='';
for (var ijhg=0; ijhg<eval(-1 + eval('' + indefs.length)); ijhg++) {
data_suit=' data-suit=' + ('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare);
thispcard=' ' + ('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-3).substring(0,2).toLowerCase().replace('00','Joker aka ').replace('01','Ace of ').replace('02','Two of ').replace('03','Three of ').replace('04','Four of ').replace('05','Five of ').replace('06','Six of ').replace('07','Seven of ').replace('08','Eight of ').replace('09','Nine of ').replace('10','Ten of ').replace('11','Jack of ').replace('12','Queen of ').replace('13','King of ') + data_suit.replace(' data-suit=','').replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '';
byis='';
if (indefs[ijhg].slice(-1) == '>' || (indefs[ijhg].slice(-1) >= '0' && indefs[ijhg].slice(-1) <= '9')) {
if ((indefs[eval(1 + ijhg)] + 'x').substring(0,1) != ' ') {
changefrom=' ' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + ':';
if (('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('h','d') == 'd') {
//alert('1:' + ysuffs[eval(-1 + eval('' + curplayer))].substring(1).split(' ')[eval('' + ijhg)]);
if (indef.indexOf('Congratulations') == -1 && ('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare) == (thehand + ' ,xxx, ').substring(1).split(',')[0].slice(-1).toLowerCase()) {
if (('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare) == trumpsare.toLowerCase()) {
byis='border:5px solid yellow;';
}
changeto=dprefix + ' <input' + data_suit + ' title="Click me if you want to play this leading suit' + byis.replace('border:5px solid yellow;',' and trump') + thispcard + ' card to my right" style="display:inline-block;background-color:lightgreen;' + byis + '" type="submit" name="myanswer" value="' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + '"></input>:<a target=_blank style="text-decoration:none;font-size:48px;color:red;font-color:red;" title="Click me if you want to play this leading suit' + byis.replace('border:5px solid yellow;',' and trump') + thispcard + ' card" href="' + aprefix + encodeURIComponent(indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)]) + '">';
} else if (('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare) == trumpsare.toLowerCase()) {
changeto=dprefix + ' <input' + data_suit + ' title="Click me if you want to play this trump' + thispcard + ' card to my right" style="display:inline-block;background-color:yellow;" type="submit" name="myanswer" value="' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + '"></input>:<a target=_blank style="text-decoration:none;font-size:48px;color:red;font-color:red;" title="Click me if you want to play this trump' + thispcard + ' card" href="' + aprefix + encodeURIComponent(indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)]) + '">';
} else {
changeto=dprefix + ' <input' + data_suit + ' title="Click me if you want to play' + thispcard + ' card to my right" style="display:inline-block;" type="submit" name="myanswer" value="' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + '"></input>:<a target=_blank style="text-decoration:none;font-size:48px;color:red;font-color:red;" title="Click me if you want to play this' + thispcard + ' card" href="' + aprefix + encodeURIComponent(indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)]) + '">';
}
//if (indef.indexOf('Congratulations') != -1) { alert("1:changefrom=" + changefrom + " changeto=" + changeto); }
} else if (('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('s','c') == 'c') {
//alert('2:' + ysuffs[eval(-1 + eval('' + curplayer))].substring(1).split(' ')[eval('' + ijhg)]);
if (indef.indexOf('Congratulations') == -1 && ('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare) == (thehand + ' ,xxx, ').substring(1).split(',')[0].slice(-1).toLowerCase()) {
if (('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare) == trumpsare.toLowerCase()) {
byis='border:5px solid yellow;';
}
changeto=dprefix + ' <input' + data_suit + ' title="Click me if you want to play this leading suit' + byis.replace('border:5px solid yellow;',' and trump') + thispcard + ' card to my right" style="display:inline-block;background-color:lightgreen;' + byis + '" type="submit" name="myanswer" value="' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + '"></input>:<a target=_blank style="text-decoration:none;font-size:48px;color:black;font-color:black;" title="Click me if you want to play this leading suit' + byis.replace('border:5px solid yellow;',' and trump') + thispcard + ' card" href="' + aprefix + encodeURIComponent(indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)]) + '">';
} else if (('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare) == trumpsare.toLowerCase()) {
changeto=dprefix + ' <input' + data_suit + ' title="Click me if you want to play this trump' + thispcard + ' card to my right" style="display:inline-block;background-color:yellow;" type="submit" name="myanswer" value="' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + '"></input>:<a target=_blank style="text-decoration:none;font-size:48px;color:black;font-color:black;" title="Click me if you want to play this trump' + thispcard + ' card" href="' + aprefix + encodeURIComponent(indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)]) + '">';
} else {
changeto=dprefix + ' <input' + data_suit + ' title="Click me if you want to play' + thispcard + ' card to my right" style="display:inline-block;" type="submit" name="myanswer" value="' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + '"></input>:<a target=_blank style="text-decoration:none;font-size:48px;color:black;font-color:black;" title="Click me if you want to play this' + thispcard + ' card" href="' + aprefix + encodeURIComponent(indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)]) + '">';
}
//if (indef.indexOf('Congratulations') != -1) { alert("2:changefrom=" + changefrom + " changeto=" + changeto); }
} else {
//alert('3:' + ysuffs[eval(-1 + eval('' + curplayer))].substring(1));
if (indef.indexOf('Congratulations') == -1 && ('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare) == (thehand + ' ,xxx, ').substring(1).split(',')[0].slice(-1).toLowerCase()) {
if (('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare) == trumpsare.toLowerCase()) {
byis='border:5px solid yellow;';
}
changeto=dprefix + ' <input' + data_suit + ' title="Click me if you want to play this leading suit' + byis.replace('border:5px solid yellow;',' and trump') + thispcard + ' card to my right" style="display:inline-block;background-color:lightgreen;' + byis + '" type="submit" name="myanswer" value="' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + '"></input>:<a target=_blank style="text-decoration:none;font-size:48px;" title="Click me if you want to play this leading suit' + byis.replace('border:5px solid yellow;',' and trump') + thispcard + ' card" href="' + aprefix + encodeURIComponent(indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)]) + '">';
} else if (('' + ysuffs[eval(-1 + curplayer)].substring(1).split(' ')[eval('' + ijhg)]).slice(-1).toLowerCase().replace('0',trumpsare) == trumpsare.toLowerCase()) {
changeto=dprefix + ' <input' + data_suit + ' title="Click me if you want to play this trump' + thispcard + ' card to my right" style="display:inline-block;background-color:yellow;" type="submit" name="myanswer" value="' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + '"></input>:<a target=_blank style="text-decoration:none;font-size:48px;" title="Click me if you want to play this trump' + thispcard + ' card" href="' + aprefix + encodeURIComponent(indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)]) + '">';
} else {
changeto=dprefix + ' <input' + data_suit + ' title="Click me if you want to play' + thispcard + ' card to my right" style="display:inline-block;" type="submit" name="myanswer" value="' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + '"></input>:<a target=_blank style="text-decoration:none;font-size:48px;" title="Click me if you want to play this' + thispcard + ' card" href="' + aprefix + encodeURIComponent(indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)]) + '">';
}
//if (indef.indexOf('Congratulations') != -1) { alert("3:changefrom=" + changefrom + " changeto=" + changeto); }
}
if (1 == 7 && (in_bidding || in_kitty)) {
changeto=changeto.split('<a ')[0];
dprefix='';
} else {
dprefix='</a>';
}
indef=indef.replace(changefrom, changeto);
} else if (dprefix != '') {
changefrom=' ' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + ':';
changeto=dprefix + ' ' + indefs[ijhg].split(' ')[eval(-1 + indefs[ijhg].split(' ').length)] + ':';
if (1 == 7 && (in_bidding || in_kitty)) {
changeto=changeto.split('<a ')[0];
} else {
dprefix='';
}
indef=indef.replace(changefrom, changeto);
}
}
}
var htmlis='<html><body><meta charset="utf-8"/><form method=GET action="' + document.URL.split('?')[0].split('#')[0] + '"><input type=hidden name=gamedate id=gamedate value="' + dis + '"></input><div style=font-size:36px;>' + efs(tabord(indef + dprefix)) + '</div></form></body></html>';
if (in_bidding) {
if (hsuffs[eval(-1 + bidplayer)] == '' || in_kitty) { hsuffs[eval(-1 + bidplayer)]=htmlis; } else { htmlis=hsuffs[eval(-1 + bidplayer)].replace(': None<',': ' + cbid + '<').replace(/\ href\=/g,' data-href='); }
if (in_kitty) {
var tdata=htmlis.split('</table>')[0];
var tdatato=tdata.replace(/button/g, 'submit').replace(/\=isyellow/g, '=isnotyellow');
//htmlis=htmlis.replace(/button/g, 'submit').replace(/\=isyellow/g, '=isnotyellow');
htmlis=htmlis.replace(tdata, tdatato);
in_kitty=false;
console.log('in_kitty=False');
clater(); //document.head.innerHTML+='<style> html { cursor: url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + emojisuit() + '</text></svg>") 16 0, pointer; } </style>';
}
}
form.append('body', htmlis.replace(': None<',': ' + cbid + '<').replace(String.fromCodePoint(232), 'è').replace(/\ open\_/g, ' open ').replace(String.fromCodePoint(232), 'è').replace(/\ open\_/g, ' open '));
//alert(decodeURIComponent(inhref.split('body=')[1].split('&')[0].split('#')[0]));
xhr.open('post', '//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php', true);
xhr.send(form);
// Thu Apr 15 2021 12:05:50 GMT 1000 (Australian Eastern Standard Time)
listenforwhat=('' + dis).replace(/\+/g,'_').replace(/\ /g,'_').replace(/\:/g,'_').replace(/\(/g,'_').replace(/\)/g,'_').toLowerCase() + '.html';
setTimeout(listenout, 5000);
return '';
}
return inhref;
}
function retcom(mesg, retv) {
var afi=null, thbits=[], ith=0, jth=0, kth=1, prefis='';
var ccbit='', bbbit='', followedby='';
var splitter=' ...';
var stitle='';
pmesg=mesg;
pretv=pretv;
mailtos=[];
smss=[];
if (!dis) {
dis=new Date();
}
if (in_bidding) {
if (mesg.indexOf(' ' + bidplayer + '.11:') != -1) { mesg=mesg.split(' ' + bidplayer + doteleven)[0]; }
if (msuffs[eval(-1 + bidplayer)] == '') { msuffs[eval(-1 + bidplayer)]=mesg; }
if (rsuffs[eval(-1 + bidplayer)] == '') { rsuffs[eval(-1 + bidplayer)]=retv; }
}
var thisd=new Date();
var sbit='';
if (in_bidding) {
if (in_kitty) {
prefis='Kitty decisions of winning bid in this 500 card game is ' + (dr(cbid) + ' (by Player ' + ('' + cbidby).replace('1','1,Player III').replace('2','2,Player IV').replace('3','3,Player 1').replace('4','4,Player 2').replace('III','3').replace('IV','4') + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + '. ';
}
sbit='Bidding proceeds after last ' + (dr(cbid) + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' leading bid. ';
prefis+=sbit; //'Bidding proceeds after last ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' leading bid. ';
for (var ihgs=0; ihgs<ssuffs.length; ihgs++) {
if (ssuffs[ihgs].indexOf('Bidding proceeds ') != -1) {
ssuffs[ihgs]='Bidding proceeds after last ' + (dr(cbid) + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' leading bid. ';
}
}
} else if (cbid != 'None') {
if (in_kitty) {
prefis='Kitty decisions of winning bid in this 500 card game is ' + (dr(cbid) + ' (by Player ' + ('' + cbidby).replace('1','1,Player III').replace('2','2,Player IV').replace('3','3,Player 1').replace('4','4,Player 2').replace('III','3').replace('IV','4') + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + '. ';
//alert('prefis=' + prefis);
} else {
prefis='Winning bid in this 500 card game is ' + (dr(cbid) + ' (by Player ' + ('' + cbidby).replace('1','1,Player III').replace('2','2,Player IV').replace('3','3,Player 1').replace('4','4,Player 2').replace('III','3').replace('IV','4') + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + '. ';
}
}
if (mesg.indexOf('Congratulations') >= 0) {
prefis='Congratulations' + csuffix.replace(' Will resend last email if you cancel this play.', ', again, but last play did not follow suit, so ') + ' ... ' + prefis;
} else if (mesg.indexOf('Bad luck') >= 0) {
prefis='Bad luck' + csuffix.replace(' Will resend last email if you cancel this play.', ', again, but last play did not follow suit, so ') + ' ... ' + prefis;
} else {
prefis+=csuffix.replace(' Will resend last email if you cancel this play.', ' Sorry, but last play did not follow suit, so ... ');
}
if (thehand.replace(',','') != '') {
splitter='youllneverfindthis';
}
if (eval('' + emailsms.length) >= eval('' + curplayer)) {
if (emailsms[eval(-1 + eval('' + curplayer))].indexOf('@') != -1) {
afi=document.createElement('a');
afi.target='_blank';
if (('' + curplayer) != '1' || 1 == 1) {
if (clong(1).indexOf('@') != -1) {
for (kth=1; kth<eval('' + nominal_numplayers); kth++) {
followedby+=', Player ' + clong(eval(1 + kth));
}
ccbit='&cc=' + fes(emailsms[0].trim(),0);
bbbit='(dealt by Player ' + clong(1) + followedby + ') ';
if (thehand.replace(',','') != '' && 1 == 1) {
cemstuff='';
emstuff='';
wemstuff='';
wemstuffx='';
//alert(thehand);
thbits=('' + thehand).split(',');
for (ith=0; ith<thbits.length; ith++) {
if (thbits[ith] != '') {
for (jth=0; jth<spcps.length; jth++) {
if (spcps[jth].indexOf(thbits[ith].slice(-3) + '.') != -1) {
emstuff+=' ' + String.fromCodePoint(eval('' + spcps[jth].split('/')[0]));
stitle=' title="Played card ' + spcps[jth].split('.')[0].slice(-3).substring(0,2).toLowerCase().replace('00','Joker aka ').replace('01','Ace of ').replace('02','Two of ').replace('03','Three of ').replace('04','Four of ').replace('05','Five of ').replace('06','Six of ').replace('07','Seven of ').replace('08','Eight of ').replace('09','Nine of ').replace('10','Ten of ').replace('11','Jack of ').replace('12','Queen of ').replace('13','King of ') + spcps[jth].split('.')[0].slice(-1).replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '" ';
if (spcps[jth].slice(-5).substring(0,1).toLowerCase().replace('h','d') == 'd') {
cemstuff+=' <font color=red>' + wemst(String.fromCodePoint(eval('' + spcps[jth].split('/')[0])), eval(1 + ith), thbits.length, eval('' + spcps[jth].split('/')[0]), jth, stitle) + '</font>';
} else {
cemstuff+=' ' + wemst(String.fromCodePoint(eval('' + spcps[jth].split('/')[0])), eval(1 + ith), thbits.length, eval('' + spcps[jth].split('/')[0]), jth, stitle);
}
//alert(emstuff);
}
}
}
}
if (emstuff != '') {
//if (prefis == '' && thehand.replace(',','') != '') { alert(mesg); }
if (prefis == '' && thehand.replace(',','') != '' && mesg.indexOf(' cards are ') != -1) { // && mesg.indexOf(' is hosting at ') != -1) {
mesg=mesg.replace(' cards are ', ' cards, with trick cards so far being (), are ');
prefis=' ';
splitter=' ...';
}
if (prefis != '') {
if (mesg.indexOf(' (') != -1) {
var xfrom=' (' + mesg.split(' (')[1].split(')')[0] + ')';
var xto=' (' + emstuff + ')';
if (('' + emailsms[eval(-1 + eval('' + curplayer))]).indexOf('@') != -1 && ('' + fes(emailsms[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))).toLowerCase() == ('' + fes(emailsms[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))))) {
xto=' (' + cemstuff + ')';
}
mesg=mesg.replace(xfrom, xto);
}
}
}
//if (('' + emailsms[0]).indexOf('@') != -1 && ('' + emailsms[0]).toLowerCase() == ('' + emailsms[0])) {
if (('' + emailsms[eval(-1 + eval('' + curplayer))]).indexOf('@') != -1 && ('' + fes(emailsms[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer)))).toLowerCase() == ('' + emailsms[eval(-1 + eval('' + curplayer))])) {
bbbit=bbbit.replace(')', ' and Trick ' + tricknumber + ' so far Trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + ' after lead by Player ' + clong(lastwinner) + ' is ' + cemstuff + ' and so you could click a button below or reply to Player ' + clong(1) + ' with [playerNumber].[cardNumber] of your choice)');
} else {
bbbit=bbbit.replace(')', ' and Trick ' + tricknumber + ' so far Trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + ' after lead by Player ' + clong(lastwinner) + ' is ' + emstuff + ' and so you could reply to Player ' + clong(1) + ' with [playerNumber].[cardNumber] of your choice)');
}
}
ccbit='';
}
afi.href=inhouse('mailto:' + fes(emailsms[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))) + '?subject=' + encodeURIComponent(prefis + 'Regarding the Five Hundred card game Player ' + clong(1) + ' is hosting at ' + dis + ' ... ' + mesg.split(splitter)[0] + ' ... ' + ' (at ' + thisd + ') ... ') + ccbcc('',eval(-1 + eval('' + curplayer))) + ccbit + '&body=' + encodeURIComponent(mesg.replace(' cards are ',' ' + bbbit + 'cards are ')));
} else {
afi.href=inhouse('mailto:' + fes(emailsms[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))) + '?subject=' + encodeURIComponent(prefis + 'Regarding the Five Hundred card game (Trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's)' + ' you are hosting ' + dis + ' ... ' + mesg.split(' ...')[0] + ' ...') + ccbcc('',eval(-1 + eval('' + curplayer))) + ccbit + '&body=' + encodeURIComponent(mesg));
}
if (afi.href.indexOf('mailto:') == 0) {
document.head.appendChild(afi);
//alert(afi.href);
afi.click();
}
} else if (emailsms[eval(-1 + eval('' + curplayer))].trim() != '') {
afi=document.createElement('a');
afi.target='_blank';
//afi.href='sms:' + emailsms[eval(-1 + eval('' + curplayer))] + '&body=' + encodeURIComponent(mesg);
if (('' + curplayer) != '1' || 1 == 1) {
if (clong(1).indexOf('@') != -1 || 11 == 11) {
for (kth=1; kth<eval('' + nominal_numplayers); kth++) {
followedby+=', Player ' + clong(eval(1 + kth));
}
ccbit='&cc=' + fes(emailsms[0].trim(),0);
bbbit='(dealt by Player ' + clong(1) + followedby + ') ';
if (thehand.replace(',','') != '' && 1 == 1) {
thbits=('' + thehand).split(',');
emstuff='';
wemstuff='';
wemstuffx='';
for (ith=0; ith<thbits.length; ith++) {
if (thbits[ith] != '') {
for (jth=0; jth<spcps.length; jth++) {
if (spcps[jth].indexOf(thbits[ith].slice(-3) + '.') != -1) {
emstuff+=' ' + String.fromCodePoint(eval('' + spcps[jth].split('/')[0]));
stitle=' title="Played card ' + spcps[jth].split('.')[0].slice(-3).substring(0,2).toLowerCase().replace('00','Joker aka ').replace('01','Ace of ').replace('02','Two of ').replace('03','Three of ').replace('04','Four of ').replace('05','Five of ').replace('06','Six of ').replace('07','Seven of ').replace('08','Eight of ').replace('09','Nine of ').replace('10','Ten of ').replace('11','Jack of ').replace('12','Queen of ').replace('13','King of ') + spcps[jth].split('.')[0].slice(-1).replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '" ';
if (spcps[jth].slice(-5).substring(0,1).toLowerCase().replace('h','d') == 'd') {
cemstuff+=' <font color=red>' + wemst(String.fromCodePoint(eval('' + spcps[jth].split('/')[0])), eval(1 + ith), thbits.length, eval('' + spcps[jth].split('/')[0]), jth, stitle) + '</font>';
} else {
cemstuff+=' ' + wemst(String.fromCodePoint(eval('' + spcps[jth].split('/')[0])), eval(1 + ith), thbits.length, eval('' + spcps[jth].split('/')[0]), jth, stitle);
}
}
}
}
}
if (('' + emailsms[0]).indexOf('@') != -1 && ('' + fes(emailsms[0]).toLowerCase(),0) == ('' + fes(emailsms[0],0))) {
bbbit=bbbit.replace(')', ' and Trick ' + tricknumber + ' so far Trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + ' after lead by Player ' + clong(lastwinner) + ' is ' + emstuff + ' and so you could click a button below or reply to Player ' + clong(1) + ' with [playerNumber].[cardNumber] of your choice)');
} else {
bbbit=bbbit.replace(')', ' and Trick ' + tricknumber + ' so far Trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + ' after lead by Player ' + clong(lastwinner) + ' is ' + emstuff + ' and so you could reply to Player ' + clong(1) + ' with [playerNumber].[cardNumber] of your choice)');
}
}
ccbit='';
}
afi.href='sms:' + fes(emailsms[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))) + '&body=' + encodeURIComponent('Regarding the Five Hundred card game Player ' + clong(1) + ' is hosting at ' + dis + ' (and now is ' + thisd + ') ... ' + mesg.split(splitter)[0] + ' ... ') + ccbit + encodeURIComponent(mesg.replace(' cards are ',' ' + bbbit + 'cards are '));
} else {
afi.href='sms:' + fes(emailsms[eval(-1 + eval('' + curplayer))],eval(-1 + eval('' + curplayer))) + '&body=' + encodeURIComponent('Regarding the Five Hundred card game (Trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's)' + ' you are hosting ' + dis + ' ... ' + mesg.split(' ...')[0] + ' ... ') + ccbit + encodeURIComponent(mesg);
}
document.head.appendChild(afi);
//alert(afi.href);
afi.click();
}
}
if (mesg.indexOf('Congratulations, Player ') != -1 && csuffix == '') {
var prevretv=retv;
var pcurplayer=curplayer;
var truncmesg=mesg.split(' ... ')[0];
for (var ijb=1; ijb<=eval('' + nominal_numplayers); ijb++) {
if (eval('' + ijb) != eval('' + lastwinner)) {
curplayer=ijb;
retcom(truncmesg.replace('Congratulations,', 'Bad luck Player ' + clong(ijb) + ' and good luck for '), prevretv);
curplayer=lastwinner; //pcurplayer;
}
}
retv=prevretv;
curplayer=lastwinner; //pcurplayer;
}
csuffix='';
var imc=0;
if (mailtos.length != 0 || smss.length != '') {
for (imc=0; imc<mailtos.length; imc++) {
afi=document.createElement('a');
afi.target='_blank';
afi.href=mailtos[imc];
document.head.appendChild(afi);
afi.click();
}
mailtos=[];
for (imc=0; imc<smss.length; imc++) {
//alert('sms via ' + smss[0]);
afi=document.createElement('a');
afi.target='_blank';
afi.href=smss[imc];
document.head.appendChild(afi);
afi.click();
}
smss=[];
}
return retv;
}
function clong(inisc) {
var lastintis='';
if (('' + inisc).trim() != '') {
lastintis=('' + inisc).split(' ')[eval(-1 + ('' + inisc).split(' ').length)];
if (eval('' + emailsms.length) >= eval('' + lastintis)) {
//alert('Here ' + eval('' + emailsms.length) + ' and lastintis=' + lastintis);
return '' + esf(inisc,eval(-1 + eval('' + lastintis))) + '[' + fes(emailsms[eval(-1 + eval('' + lastintis))],eval(-1 + eval('' + lastintis))) + ']';
}
}
//alert('here inisc=' + inisc + ' and other is ' + eval(-1 + eval('' + lastintis)));
return '' + esf(inisc,eval(-1 + eval('' + lastintis)));
}
function relbid(inb) {
var prej='';
if (card_game.toLowerCase() == 'bridge') {
inb='';
if (dsdn == '') {
inb+=',double';
prej=inb;
}
if (rsdn == '') {
inb+=',redouble';
prej=inb;
}
for (var iuyt=0; iuyt<bids.length; iuyt++) {
inb+=',' + bids[iuyt];
}
}
outb=inb;
if (cbid.replace('None','pass').toLowerCase() != 'pass') {
if (inb.indexOf(',' + (cbid.toLowerCase() + ' ').substring(0,3).trim()) != -1) {
outb=inb.split(',' + (cbid.toLowerCase() + ' ').substring(0,3).trim())[1];
if (outb.indexOf(',') != -1) {
return outb.replace(outb.split(',')[0] + ',', prej + ',').replace('7n,double,redouble','7n');
} else {
return '';
}
}
}
return outb.replace('7n,double,redouble','7n');
}
function myalertmc(wh) {
gwh=wh;
if (passcnt != 0 && donelistis.indexOf(',' + curplayer + ',') != -1) {
//alert('CPius');
gmyalertmc();
} else {
setTimeout(gmyalertmc, deftwo);
deftwo=200;
}
}
function gmyalertmc() { // (wh) {
var wh='';
if (gwh != '') {
wh=gwh;
gwh='';
}
var inbidding=in_bidding;
var kittybidding='';
//if (in_kitty) {
// inbidding=false;
//}
if (card_game == ulgame('500ISH')) {
wh=wh.split(' ' + curplayer + doteleven + ':')[0];
}
var aapref='', bbpref='';
if (inbidding) {
if ((cbid + ' ').toLowerCase().indexOf('ope') == 0) {
bbpref='In this bidding phase the last winning bid is ' + (dr(cbid) + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' (bearing in mind that a lowercase email address suffices to enter your next bid, via an email)? ';
} else {
bbpref='In this bidding phase the last winning bid is ' + (dr(cbid) + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' so what is your bid out of Pass' + relbid(',6s,6c,6d,6h,6n,7s,7c,7d,7h,7n,8s,mis' + String.fromCodePoint(232) + 're,8c,8d,8h,8n,9s,9c,9d,9h,9n,10s,10c,10d,10h' + (',open_mis' + String.fromCodePoint(232) + 're,').substring(0) + '10n') + ' (bearing in mind that a lowercase email address suffices to enter your next bid, via an email)? ';
}
aapref=bbpref;
}
if (card_game.toUpperCase() == ulgame('500ISH')) { console.log('wh=' + wh + ' and aapref=' + aapref); if (aapref == '' && wh.replace('Bad luck ','Congratulations ').indexOf('Congratulations') != -1) { aapref=wh.split('. ')[0] + '. '; } aapref+='In this game trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's, '; }
if (in_kitty && in_bidding) {
kittybidding=" Kitty of 3 cards (" + kemoji + ") can be swapped via comma separated list of card replacements in order eg. " + curplayer + ".7,," + curplayer + ".5 replaces card 7 with Kitty Card 1 and replaces card 5 with Kitty Card 3. " + ozt(zsuffs[eval(-1 + eval('' + curplayer))].split(' ' + curplayer + doteleven + ':')[0]);
if (card_game.toLowerCase() == 'bridge') { kittybidding=' '; }
}
if (!in_kitty && !in_bidding) {
aapref='';
bbpref='';
kittybidding='';
//alert(wh);
}
if (curplayer == curplayer) {
var huhc='yes';
var cfm='';
//alert('emailsms.length=' + emailsms.length + ' curplayer=' + curplayer);
if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//if (thehand.replace(',','') != '' && wh.indexOf(' (') == -1) {
//wh+=' ... cards so far in this trick are () ';
//alert(wh);
//huhc=retcom(wh.replace('Player 1 ', 'Player 1 (dealer and host) '), ' ');
//} else {
huhc=retcom(wh.replace('Player 1 ', 'Player 1 (dealer and host) '), ' ');
//}
} else if (inbidding || in_kitty) {
if (kittybidding != '') {
donelistis=',1,2,3,4,';
//if (bbpref != '') { alert('cuRplayer'); }
console.log('omc=' + omc + ' and sef(emailsms[0], 0).trim()=' + sef(emailsms[0], 0).trim());
if (eval('' + omc) >= 0 && (eval('' + emailsms.length) < 1 || eval('' + emailsms.length) < 2 || eval('' + emailsms.length) < 3 || eval('' + emailsms.length) < 4)) {
if (card_game.toLowerCase() == 'bridge') {
alert('Hello all you non-remote Bridge card game players! Here are the cards for public viewing of ' + sef(emailsms[eval(-1 + omc)], eval(-1 + omc)) + ' ... ' + zsuffs[eval(-1 + omc)] + ' ... when you have all finished looking, just leave ' + sef(emailsms[eval(-1 + omh)], eval(-1 + omh)) + ' looking, to then deal with the kitty, as they click the OK button.');
} else {
alert('Hello all you non-remote 500 card game players! Here are the cards for public viewing of ' + sef(emailsms[eval(-1 + omc)], eval(-1 + omc)) + ' ... ' + zsuffs[eval(-1 + omc)] + ' ... when you have all finished looking, just leave ' + sef(emailsms[eval(-1 + omh)], eval(-1 + omh)) + ' looking, to then deal with the kitty, as they click the OK button.');
}
}
var notyet=true;
var prevkittybidding=kittybidding;
if (card_game.toLowerCase() == 'bridge') {
cfm='';
} else {
kittybidding=prevkittybidding.split('Kitty Card 1')[0] + 'Kitty Card 1' + antiinem(prevkittybidding.split('Kitty Card 1')[1]).replace(/\&\#[0-9]*\;/g, ' ') + " You can answer with ? to re-see your cards. ";
}
while (notyet) {
if (card_game.toLowerCase() != 'bridge') {
cfm=prompt(efs(aapref.replace('In this bidding phase the last winning bid is ','Last winning bid is ').replace(' (bearing in mind that a lowercase email address suffices to enter your next bid, via an email)','') + efs('Player ' + clong(curplayer),curplayer) + ', see your cards below. ' + kittybidding,curplayer),'');
}
notyet=false;
if (cfm != null) {
if (cfm == '?') {
notyet=true;
kittybidding=prevkittybidding;
}
}
}
} else {
//if (bbpref != '') { alert('Curplayer=' + curplayer + ' clong(curplayer)=' + clong(curplayer)); }
cfm=prompt(efs(aapref + 'Player ' + clong(curplayer) + ', do you want to see your cards while other players turn away in popup (alert) window, else enter an email/SMS address/number ( eg. Robert Metcalfe[rmetcalfe15@gmail.com] ) for you as Player ' + curplayer + '? ' + kittybidding,curplayer),'');
}
if (cfm != null && kittybidding != '') {
var sentas=cfm.split(',');
var outgoes=0, inthree='', outthree='', ibn=0;
//alert('here with cfm=' + cfm);
if (eval('' + sentas.length) > 1 || ('' + cfm).indexOf('.') != -1 || ('' + cfm).trim() == '') {
for (var is=0; is<sentas.length; is++) {
if (sentas[is].trim() != '') {
outgoes=eval(-1 + eval('' + sentas[is].replace('' + curplayer + '.','')));
inthree=hands[eval(40 + eval('' + is))].slice(-3);
outthree=hands[outgoes].slice(-3);
for (ibn=0; ibn<spcps.length; ibn++) {
if (spcps[ibn].indexOf(inthree + '.') != -1) {
inthree=spcps[ibn].split('/')[0];
}
if (spcps[ibn].indexOf(outthree + '.') != -1) {
outthree=spcps[ibn].split('/')[0];
}
}
hands[outgoes]=hands[eval(40 + eval('' + is))];
if (eval('' + outthree.length) == 6 && eval('' + inthree.length) == 6) {
zsuffs[eval(-1 + eval('' + curplayer))]=zsuffs[eval(-1 + eval('' + curplayer))].replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree))).split(' ' + curplayer + doteleven + ':')[0];
ysuffs[eval(-1 + eval('' + curplayer))]=ysuffs[eval(-1 + eval('' + curplayer))].replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree))).split(' ' + curplayer + doteleven + ':')[0];
msuffs[eval(-1 + eval('' + curplayer))]=msuffs[eval(-1 + eval('' + curplayer))].replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
hsuffs[eval(-1 + eval('' + curplayer))]=hsuffs[eval(-1 + eval('' + curplayer))].replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
defstyle=defstyle.replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
defstyle=defstyle.replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
defstyle=defstyle.replace(String.fromCodePoint(eval('' + outthree)), String.fromCodePoint(eval('' + inthree)));
}
}
}
if (1 == 1) {
if (cbid.trim().slice(-1).toLowerCase() == 'n' || cbid.toLowerCase().indexOf('mis') != -1) {
trumpsare='0';
} else {
trumpsare=cbid.trim().slice(-1).toLowerCase();
}
if (trumpsare != origt) {
hands=orighands;
var ixc=0, bdl=[], kjn=0;
var blanks=' ';
for (ixc=0; ixc<nominal_numplayers; ixc++) {
zsuffs[ixc]='';
ysuffs[ixc]='';
//wsuffs[ixc]='';
}
for (ixc=0; ixc<hands.length; ixc++) {
bdl=hands[ixc].split(' ');
if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('000') == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,17);
//alert(hands[ixc].replace(' ',blanks.substring(0,20)).replace(/\ /g,'x'));
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,33));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 33'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]);
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('11' + trumpsare) == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,17);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,31));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 31'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]);
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('11' + trumpsare.replace('c','S').replace('s','C').replace('d','H').replace('h','D').toLowerCase()) == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,16);
//alert('found right bower as ' + bdl[eval(-1 + eval('' + bdl.length))]);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,30));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 30'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]);
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].slice(-1) == trumpsare) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,13);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,27));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 27'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]);
}
}
}
} else {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'');
hands[ixc]=hands[ixc];
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 0'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]);
}
}
}
}
}
zsuff=zsuffs[eval(-1 + curplayer)];
//orighands=hands;
origt=trumpsare;
} //else {
//alert('there');
//}
//alert('trumpsare=' + trumpsare + ' and ' + defstyle.indexOf('></text>'));
//defstyle=defstyle.replace('></text>', '>' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '</text>');
if (117 == 117) { defstyle=defstyle.replace('></text>', '>' + emojisuit() + '</text>'); }
for (var zihgs=0; zihgs<hsuffs.length; zihgs++) {
//hsuffs[zihgs]=hsuffs[zihgs].replace('></text>', '>' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '</text>');
hsuffs[zihgs]=hsuffs[zihgs].replace('></text>', '>' + emojisuit() + '</text>');
}
in_bidding=false;
in_kitty=false;
console.log('in_kitty=FAlse');
clater(); //document.head.innerHTML+='<style> html { cursor: url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + emojisuit() + '</text></svg>") 16 0, pointer; } </style>';
card_of_play=0;
inbidding=false;
curplayer=eval('' + cbidby);
lastwinner=eval('' + curplayer);
kittybidding='';
aapref='';
bbpref='';
var hjg='' + lastwinner;
var prevcsuff=csuff;
csuff='';
for (var ipl=0; ipl<hjg.length; ipl++) {
//alert(hjg.substring(ipl,eval(1 + eval('' + ipl))) + ' has ord ' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0) + ' to ' + eval(8304 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
thehand=',';
//alert('prevcsuff=' + prevcsuff + ' and csuff=' + csuff);
if (sss != '' && defstyle.indexOf(sss) == -1 && defstyle.indexOf(' leading ') == -1 && !sssdone) {
sssdone=true;
//defstyle=defstyle.replace('Click away Player ' + prevcsuff + '', 'Click away Player ' + csuff + ' ' + sss);
defstyle=defstylereplace(' ' + prevcsuff + '', ' ' + csuff + ' ' + sss);
dhi=dhi.replace(prevcsuff,csuff + ' ' + sss);
} else {
//defstyle=defstyle.replace('Click away Player ' + prevcsuff + '', 'Click away Player ' + csuff + '');
defstyle=defstylereplace(' ' + prevcsuff + '', ' ' + csuff + '');
dhi=dhi.replace(prevcsuff,csuff);
}
console.log('f');
document.head.innerHTML+=bpmore(defstyle);
donelistis=(',1,2,3,4,').replace(',' + lastwinner + ',', ',');
donelistis=',' + lastwinner + ',';
cfm='';
}
}
}
if (cfm == null) {
huhc='';
} else if (('' + cfm).trim() != '') {
if (cfm.indexOf(',') != -1) {
cfm=fes(cfm,eval(-1 + eval('' + curplayer)));
}
var jsbid=false;
if (inbidding && cfm.indexOf('@') == -1 && cfm.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'').trim() != '') {
var fd=false;
for (var iibidis=0; iibidis<bids.length; iibidis++) {
if ((cfm.split('|')[0].split(',')[0] + ' ').toLowerCase().substring(0,3) == (bids[iibidis] + ' ').toLowerCase().substring(0,3)) {
fd=true;
}
}
if (!fd) { cfm=fes(cfm, curplayer); }
}
if (inbidding && cfm.indexOf('@') == -1 && cfm.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') != '') {
for (var ibidis=0; ibidis<bids.length; ibidis++) {
if (cfm.toLowerCase().indexOf('pass') == 0) {
jsbid=true;
gd=('' + dis);
sentanswer='pass ';
//alert('about to send pass with passcnt=' + passcnt);
console.log('1:sentclick()');
sentclick();
} else if (cfm.toLowerCase().indexOf('doub') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 1) {
jsbid=true;
gd=('' + dis);
sentanswer='double ';
//alert('about to send double with passcnt=' + passcnt);
console.log('1:sentclick()');
//cfm=''; //null;
if (cfm.toLowerCase().indexOf('redo') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 2) { doublefactor=4; rsdn=" style='display:none;'"; dsdn=" style='display:none;'"; }
xpass=-1; //passcnt--;
sentanswer='pass ';
sentclick();
} else {
sentclick();
}
} else if (cfm.toLowerCase().indexOf('doub') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 1) { doublefactor=2; dsdn=" style='display:none;'"; rsdn=""; }
xpass=-1; //passcnt--;
sentanswer='pass ';
sentclick();
} else {
sentclick();
}
} else if (56 == 78 && cfm.toLowerCase().indexOf('doub') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 1) {
jsbid=true;
gd=('' + dis);
sentanswer='double ';
//alert('about to send double with passcnt=' + passcnt);
console.log('1:sentclick()');
sentclick();
}
} else if (56 == 78 && cfm.toLowerCase().indexOf('redo') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 2) {
jsbid=true;
gd=('' + dis);
sentanswer='redouble';
//alert('about to send redouble with passcnt=' + passcnt);
console.log('1:sentclick()');
sentclick();
}
} else if ((cfm + ' ').substring(0,3).toLowerCase() == (bids[ibidis] + ' ').substring(0,3).toLowerCase()) {
jsbid=true;
gd=('' + dis);
sentanswer=bids[ibidis] + ' ';
console.log('2:sentclick() ' + sentanswer);
sentclick();
}
}
}
if (!jsbid) {
if (communication_list == '') {
communication_list+=cfm;
emailsms=communication_list.split(',');
} else {
communication_list+=',' + cfm;
emailsms=communication_list.split(',');
}
huhc=retcom(wh, ' ');
}
} else {
huhc='yes';
}
} else if (card_game != ulgame('500ISH') || donelistis.replace(',','') == '') {
//alert('here');
//alert('curplayer=' + curplayer + ' clong(curplayer)=' + clong(curplayer));
cfm=prompt(efs(aapref + 'Player ' + clong(curplayer) + ', do you want to see your cards while other players turn away in popup (alert) window, else enter an email/SMS address/number ( eg. Robert Metcalfe[rmetcalfe15@gmail.com] ) for you as Player ' + curplayer + '? ' + kittybidding,curplayer),'');
if (cfm == null) { huhc=''; } else if (('' + cfm).trim() != '') { if (communication_list == '') { communication_list+=cfm; emailsms=communication_list.split(','); } else { communication_list+=',' + cfm; emailsms=communication_list.split(','); } huhc=retcom(wh, ' '); } else { huhc='yes'; }
}
if (huhc.trim() != '' && !inbidding) {
if (card_game != ulgame('500ISH') || donelistis.replace(',','') == '') { alert(wh); }
} else if (huhc.trim() != '' && inbidding) {
//alert('Heree');
if (!in_bidding && !in_kitty) {
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
donelistis+='' + curplayer + ',';
cfm=prompt(efs('Winning bid is ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' where trumps are ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's. ' + wh,curplayer),'');
} else {
cfm='';
}
} else {
cfm=prompt(efs(bbpref + wh,curplayer),'');
}
if (cfm == null) {
huhc='';
} else if (('' + cfm).trim() != '') {
var isbid=false;
if (inbidding && cfm.indexOf('@') == -1 && cfm.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') != '') {
for (var ibidis=0; ibidis<bids.length; ibidis++) {
if (('' + cfm).toLowerCase().indexOf('pass') == 0) {
isbid=true;
gd=('' + dis);
sentanswer='pass ';
console.log('3:sentclick() and ma=' + ma);
cfm=''; //null;
sentclick();
} else if (cfm.toLowerCase().indexOf('doub') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 1) {
isbid=true;
gd=('' + dis);
sentanswer='double ';
//alert('about to send double with passcnt=' + passcnt);
console.log('11:sentclick()');
//cfm=''; //null;
if (cfm.toLowerCase().indexOf('redo') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 2) { doublefactor=4; rsdn=" style='display:none;'"; dsdn=" style='display:none;'"; }
cfm=''; //null;
xpass=-1; //passcnt--;
sentanswer='pass ';
sentclick();
} else if (cfm.toLowerCase().indexOf('doub') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 1) { doublefactor=2; dsdn=" style='display:none;'"; rsdn=""; }
cfm=''; //null;
xpass=-1; //passcnt--;
sentanswer='pass ';
sentclick();
} else {
sentclick();
}
}
} else if (cfm.toLowerCase().indexOf('redo') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 2) {
isbid=true;
gd=('' + dis);
sentanswer='redouble';
//alert('about to send redouble with passcnt=' + passcnt);
console.log('11:sentclick()');
//cfm=''; //null;
if (cfm.toLowerCase().indexOf('redo') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 2) { doublefactor=4; rsdn=" style='display:none;'"; dsdn=" style='display:none;'"; }
cfm=''; //null;
xpass=-1; //passcnt--;
sentanswer='pass ';
sentclick();
} else if (cfm.toLowerCase().indexOf('doub') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 1) { doublefactor=2; dsdn=" style='display:none;'"; rsdn=""; }
cfm=''; //null;
xpass=-1; //passcnt--;
sentanswer='pass ';
sentclick();
} else {
sentclick();
}
}
} else if (('' + cfm + ' ').substring(0,3).toLowerCase() == (bids[ibidis] + ' ').substring(0,3).toLowerCase()) {
isbid=true;
gd=('' + dis);
sentanswer=bids[ibidis] + ' ';
console.log('4:sentclick() ' + sentanswer);
sentclick();
}
}
}
if (!isbid) {
if (communication_list == '') {
communication_list+=cfm;
emailsms=communication_list.split(',');
} else {
communication_list+=',' + cfm;
emailsms=communication_list.split(',');
}
huhc=retcom(wh, ' ');
}
} else {
huhc='yes';
}
}
}
}
function dr(cb) {
if (doublefactor == 2 && card_game.toUpperCase() == 'BRIDGE') {
return '' + cb + ' ' + String.fromCodePoint(10133); //➕';
} else if (doublefactor == 4 && card_game.toUpperCase() == 'BRIDGE') {
return '' + cb + ' ' + String.fromCodePoint(10133) + ' ' + String.fromCodePoint(174,65039); //➕ ®️';
}
return '' + cb;
}
function drb(invis) {
if (doublefactor == 1) { return '' + invis; }
return '' + invis + ' x ' + doublefactor;
}
function brd(invis) {
var jnvis=eval(doublefactor * eval('' + invis));
return '' + jnvis;
}
function sfhz(torf) {
if (aaurl == '') {
var om='';
var psx=scoresuffix;
var jkscores=scoresuffix.split(',');
var iyt=0, lurldone=false;
var tscores=[];
for (iyt=0; iyt<eval('' + jkscores.length); iyt++) {
if (('' + jkscores[iyt]).indexOf('-') != -1) {
tscores.push(eval(jkscores[iyt].split('.')[0].replace('-','')));
} else {
tscores.push(eval(jkscores[iyt].split('.')[0]));
}
}
var sofard=scoresuffix.split('.');
for (iyt=0; iyt<eval('' + bids.length); iyt++) {
if ((bids[iyt].toLowerCase() + ' ').substring(0,3).indexOf((cbid + ' ').toLowerCase().substring(0,3)) != -1) {
if (cbid.indexOf('6') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 6) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('g');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 6) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('h');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (cbid.indexOf('7') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 7) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('i');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 7) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
scoresuffix=progressbar(scoresuffix.replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], '' + tscores[eval(-1 + eval('' + cbidby))] + '.' + jscores[eval(-1 + eval('' + cbidby))]));
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
console.log('j');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (cbid.indexOf('8') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 8) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('k');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 8) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('l');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (cbid.indexOf('9') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 9) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('m');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 9) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('n');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (cbid.indexOf('10') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 10) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('o');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 10) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('p');
document.head.innerHTML+=bpmore(defstyle);
}
} else {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) == 0) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('q');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) == 0) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=progressbar(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('r');
document.head.innerHTML+=bpmore(defstyle);
}
}
}
}
}
if (torf) {
if (eval(eval('' + jscores[0]) + eval('' + jscores[2])) >= 500) {
if (confirm('Congratulations, Player 1 and Player 3 for reaching 500. Another game?')) {
lurldone=true;
location.href=lurl();
jscores=[0,0,0,0];
}
} else if (eval(eval('' + jscores[1]) + eval('' + jscores[3])) >= 500) {
if (confirm('Congratulations, Player 2 and Player 4 for reaching 500. Another game?')) {
lurldone=true;
location.href=lurl();
jscores=[0,0,0,0];
}
} else if (eval(eval('' + jscores[0]) + eval('' + jscores[2])) <= -500) {
if (confirm('Congratulations, Player 2 and Player 4 for opponents reaching -500. Another game?')) {
lurldone=true;
location.href=lurl();
jscores=[0,0,0,0];
}
} else if (eval(eval('' + jscores[1]) + eval('' + jscores[3])) <= -500) {
if (confirm('Congratulations, Player 1 and Player 3 for opponents reaching -500. Another game?')) {
lurldone=true;
location.href=lurl();
jscores=[0,0,0,0];
}
}
if (!lurldone) { location.href=lurl(); }
}
return lurl();
}
function asfhz(torf) {
if (aaurl == '') {
var om='';
var psx=scoresuffix;
var jkscores=scoresuffix.split(',');
var iyt=0, lurldone=false;
var tscores=[];
for (iyt=0; iyt<eval('' + jkscores.length); iyt++) {
if (('' + jkscores[iyt]).indexOf('-') != -1) {
tscores.push(eval(jkscores[iyt].split('.')[0].replace('-','')));
} else {
tscores.push(eval(jkscores[iyt].split('.')[0]));
}
}
var sofard=scoresuffix.split('.');
for (iyt=0; iyt<eval('' + bids.length); iyt++) {
if ((bids[iyt].toLowerCase() + ' ').substring(0,3).indexOf((cbid + ' ').toLowerCase().substring(0,3)) != -1) {
if (cbid.indexOf('6') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 6) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('g');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 6) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('h');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (cbid.indexOf('7') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 7) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('i');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 7) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
scoresuffix=(scoresuffix.replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], '' + tscores[eval(-1 + eval('' + cbidby))] + '.' + jscores[eval(-1 + eval('' + cbidby))]));
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
console.log('j');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (cbid.indexOf('8') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 8) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('k');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 8) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('l');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (cbid.indexOf('9') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 9) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('m');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 9) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('n');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (cbid.indexOf('10') == 0) {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) >= 10) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('o');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 10) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('p');
document.head.innerHTML+=bpmore(defstyle);
}
} else {
if (('' + cbidby).replace('3','1') == '1') {
if (eval(tscores[0] + tscores[2]) == 0) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('q');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) == 0) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + brd(sbid[iyt]));
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + brd(sbid[iyt]));
}
om='' + jscores[eval(-1 + eval('' + cbidby))];
if (om.substring(0,1) == '-') { om='-'; } else { om=''; }
scoresuffix=(scoresuffix.replace('-' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])).replace('' + tscores[eval(-1 + eval('' + cbidby))] + '.' + sofard[eval(-1 + eval('' + cbidby))].split(',')[0], om + tscores[eval(-1 + eval('' + cbidby))] + '.' + Math.abs(jscores[eval(-1 + eval('' + cbidby))])));
defstyle=defstyle.replace(' ' + psx + '<', ' ' + scoresuffix + '<');
console.log('r');
document.head.innerHTML+=bpmore(defstyle);
}
}
}
}
}
if (torf) {
if (eval(eval('' + jscores[0]) + eval('' + jscores[2])) >= 500) {
if (confirm('Congratulations, Player 1 and Player 3 for reaching 500. Another game?')) {
lurldone=true;
location.href=lurl();
jscores=[0,0,0,0];
}
} else if (eval(eval('' + jscores[1]) + eval('' + jscores[3])) >= 500) {
if (confirm('Congratulations, Player 2 and Player 4 for reaching 500. Another game?')) {
lurldone=true;
location.href=lurl();
jscores=[0,0,0,0];
}
} else if (eval(eval('' + jscores[0]) + eval('' + jscores[2])) <= -500) {
if (confirm('Congratulations, Player 2 and Player 4 for opponents reaching -500. Another game?')) {
lurldone=true;
location.href=lurl();
jscores=[0,0,0,0];
}
} else if (eval(eval('' + jscores[1]) + eval('' + jscores[3])) <= -500) {
if (confirm('Congratulations, Player 1 and Player 3 for opponents reaching -500. Another game?')) {
lurldone=true;
location.href=lurl();
jscores=[0,0,0,0];
}
}
if (!lurldone) { location.href=lurl(); }
}
return lurl();
}
function sfh(invl) {
var ssl=eval(0 + eval('' + scoresuffix.split(',').length));
if (scoresuffix == '') { ssl=0; }
if (card_game == ulgame('500ISH')) {
//alert('scoresuffix=' + scoresuffix + ' calls on jscores[' + ssl + ']');
if (invl.indexOf('.') == -1) {
if (('' + jscores[ssl]).indexOf('-') != -1) {
return '-' + invl + '.' + Math.abs(eval('' + jscores[ssl]));
} else {
return invl + '.' + jscores[ssl];
}
}
}
return '' + invl;
}
function whowon() {
//alert('at whowon');
var leadoff=lastwinner;
var wis=lastwinner, qw=0;
var tsw=wis, ioff=0;
var sofarnotrumps=true;
var oss=scoresuffix, leadis=thishand[qw].slice(-1);
var osses=scoresuffix.split(',');
if (thishand[qw].slice(-1).replace('0',trumpsare) != trumpsare && leadis == thishand[qw].slice(-1)) { ioff=13; } else { ioff=0; }
if (thishand[qw].slice(-1).replace('0',trumpsare) == trumpsare) { sofarnotrumps=false; }
var wl=eval(ioff + eval('' + thishand[qw].length));
var nextoss='', jnext;
//alert(thehand.replace(/\ /g,'x') + ' ... ' + trumpsare);
while (eval('' + qw) < eval('' + nominal_numplayers)) {
if (thishand[qw].slice(-1).replace('0',trumpsare) != trumpsare && leadis == thishand[qw].slice(-1)) { ioff=13; } else { ioff=0; }
if (eval(ioff + eval('' + thishand[qw].length)) > eval('' + wl) || (sofarnotrumps && thishand[qw].slice(-1).replace('0',trumpsare) == trumpsare)) {
//if (thishand[qw].slice(-1).replace('0',trumpsare) == trumpsare) {
if (sofarnotrumps && thishand[qw].slice(-1).replace('0',trumpsare) == trumpsare) { sofarnotrumps=false; leadis=' '; }
lastwinner=wis;
wl=eval(ioff + eval('' + thishand[qw].length));
//}
}
wis++;
if (wis > eval('' + nominal_numplayers)) { wis=1; }
qw++;
}
//alert('winner=' + lastwinner);
osses[eval(-1 + lastwinner)]='' + eval(1 + eval(('' + osses[eval(-1 + lastwinner)]).replace('-','').split('.')[0]));
scoresuffix='';
scoresuffix='' + sfh(osses[0].replace('-','').split('.')[0]);
for (jnext=1; jnext<eval('' + nominal_numplayers); jnext++) {
scoresuffix+=',' + sfh(osses[jnext].replace('-','').split('.')[0]);
}
wemstuff='';
wemstuffx='';
scoresuffix=progressbar(scoresuffix);
if (1 == 2) {
if (eval('' + emailsms.length) == 0) {
scoresuffix=scoresuffix;
} else if (('' + emailsms[0]).indexOf('@') != -1) {
if (scoresuffix.indexOf(' via ') == -1) { scoresuffix=scoresuffix + ' (via emails to Player 1 perhaps)'; }
} else if (('' + emailsms[0]).trim() == '') {
scoresuffix=scoresuffix;
} else {
if (scoresuffix.indexOf(' via ') == -1) { scoresuffix=scoresuffix + ' (via SMS to Player 1 perhaps)'; }
}
}
console.log('Congrats');
if ((!in_bidding && !in_kitty) && ((cbid + ' ').substring(0,3).toLowerCase() == 'mis' || eval('' + omc) >= 0)) {
if ((('' + curplayer) == ('' + omc) || ('' + curplayer) == ('' + omh) || ('' + curplayer) == ('' + cbidby))) { // && (spare.indexOf('Congratulations') == 0)) {
myalertwt('Opposite of Congratulations, Player ' + clong(lastwinner) + ', you win Trick ' + tricknumber + ' (' + emstuff + ') lead off by Player ' + clong(leadoff) + ' and Trumps ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '), and lead off, as applicable, for the next trick. Scores are ' + scoresuffix.split(' (via ')[0]);
//} else if ((('' + curplayer) == ('' + omc) || ('' + curplayer) == ('' + omh) || ('' + curplayer) == ('' + cbidby)) && (spare.indexOf('Bad luck') == 0)) {
// subjis='Good luck is ' + spare;
//} else if ((('' + curplayer) != ('' + omc) && ('' + curplayer) != ('' + omh) && eval('' + omc) >= 0) && (spare.indexOf('Congratulations') == 0)) {
// subjis='Sad news about ' + spare;
} else if ((('' + curplayer) != ('' + cbidby) && eval('' + omc) < 0)) { // && (spare.indexOf('Congratulations') == 0)) {
myalertwt('Sad news about Congratulations, Player ' + clong(lastwinner) + ', you win Trick ' + tricknumber + ' (' + emstuff + ') lead off by Player ' + clong(leadoff) + ' and Trumps ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '), and lead off, as applicable, for the next trick. Scores are ' + scoresuffix.split(' (via ')[0]);
} else {
myalertwt('Congratulations, Player ' + clong(lastwinner) + ', you win Trick ' + tricknumber + ' (' + emstuff + ') lead off by Player ' + clong(leadoff) + ' and Trumps ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '), and lead off, as applicable, for the next trick. Scores are ' + scoresuffix.split(' (via ')[0]);
}
} else {
myalertwt('Congratulations, Player ' + clong(lastwinner) + ', you win Trick ' + tricknumber + ' (' + emstuff + ') lead off by Player ' + clong(leadoff) + ' and Trumps ' + trumpsare.replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '), and lead off, as applicable, for the next trick. Scores are ' + scoresuffix.split(' (via ')[0]);
}
tricknumber++;
thishand=[];
curplayer=eval('' + lastwinner);
var prevcsuff=csuff;
var hjg='' + curplayer;
csuff='';
for (var ipl=0; ipl<hjg.length; ipl++) {
//alert(hjg.substring(ipl,eval(1 + eval('' + ipl))) + ' has ord ' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0) + ' to ' + eval(8304 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
thehand=',';
defstyle=defstyle.replace(' ' + oss + '<', ' ' + scoresuffix + '<');
if (csuff != prevcsuff) {
if (sss != '' && defstyle.indexOf(sss) == -1 && defstyle.indexOf(' leading ') == -1 && !sssdone) {
sssdone=true;
//defstyle=defstyle.replace('Click away Player ' + prevcsuff + '', 'Click away Player ' + csuff + ' ' + sss);
defstyle=defstylereplace(' ' + prevcsuff + '', ' ' + csuff + ' ' + sss);
} else {
//if (defstyle.indexOf(' (via ') != -1 || eval('' + emailsms.length) == 0) {
//defstyle=defstyle.replace('Click away Player ' + prevcsuff + '', 'Click away Player ' + csuff + '');
defstyle=defstylereplace(' ' + prevcsuff + '', ' ' + csuff + '');
//} else if (('' + emailsms[0]).indexOf('@') != -1) {
//defstyle=defstyle.replace('Click away Player ' + prevcsuff + '', 'Click away Player ' + csuff + ' (via emails to Player 1 perhaps)');
//} else if (('' + emailsms[0]).trim() == '') {
//defstyle=defstyle.replace('Click away Player ' + prevcsuff + '', 'Click away Player ' + csuff + '');
//} else {
//defstyle=defstyle.replace('Click away Player ' + prevcsuff + '', 'Click away Player ' + csuff + ' (via SMS to Player 1 perhaps)');
//}
}
}
console.log('s');
document.head.innerHTML+=bpmore(defstyle);
}
function defstylereplace(dfrom, dto) {
if (defstyle.indexOf(' leading ' + cbidby + ' bid ') != -1) {
dfrom=' ' + defstyle.split(' leading ' + cbidby + ' bid ')[0].split(' ')[eval(-1 + defstyle.split(' leading ' + cbidby + ' bid ')[0].split(' ').length)];
console.log('Dfrom=' + dfrom + ' and dto=' + dto);
return defstyle.replace(dfrom, dto);
} else if (defstyle.indexOf(' ' + scoresuffix) != -1) {
dfrom=' ' + defstyle.split(' ' + scoresuffix)[0].split(' ')[eval(-1 + defstyle.split(' ' + scoresuffix)[0].split(' ').length)];
console.log('DFrom=' + dfrom + ' and dto=' + dto);
return defstyle.replace(dfrom, dto);
} else if (defstyle.indexOf(' leading ' + cbidby + ' bid ') != -1) {
dfrom=' ' + defstyle.split(' leading ' + cbidby + ' bid ')[0].split(' ')[eval(-1 + defstyle.split(' leading ' + cbidby + ' bid ')[0].split(' ').length)];
console.log('DfRom=' + dfrom + ' and dto=' + dto);
return defstyle.replace(dfrom, dto);
} else if (defstyle.indexOf(' ' + scoresuffix) != -1) {
dfrom=' ' + defstyle.split(' ' + scoresuffix)[0].split(' ')[eval(-1 + defstyle.split(' ' + scoresuffix)[0].split(' ').length)];
console.log('DfrOm=' + dfrom + ' and dto=' + dto);
return defstyle.replace(dfrom, dto);
} else if (defstyle.indexOf(dfrom) != -1) {
console.log('DfroM=' + dfrom + ' and dto=' + dto);
return defstyle.replace(dfrom, dto);
}
console.log('DFROM=' + dfrom + ' and dto=' + dto);
return defstyle.replace(dfrom, dto);
}
function dolaterz(inwh) {
//alert('1 ' + donelistis);
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
//alert(11);
if (!in_bidding && !in_kitty) { donelistis+='' + curplayer + ','; } else if (!in_bidding) { donelistis+='' + curplayer + ','; }
//alert(34);
myalertmc(efs(inwh,curplayer));
} else if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert(314);
myalertmc(efs(inwh,curplayer));
} else {
alert(inwh.split(' ...')[0]);
}
}
function dolaterx() {
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
if (!in_bidding && !in_kitty) { donelistis+='' + curplayer + ','; } else if (!in_bidding) { donelistis+='' + curplayer + ','; }
//alert(534);
//alert('cuRPlayer');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
} else if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert(834);
//alert('cuRpLayer');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
}
}
function popupsim(zkq, zkl) {
var xkq='' + zkq;
if (xkq == '0') { xkq='' + deckn; }
aminmiddle=false;
//if (card_game.toLowerCase() == '500ish' && lasttogglenumber == ' ') { lasttogglenumber=''; }
if (lasttogglenumber != ' ') {
for (var ihj=0; ihj<spcps.length; ihj++) {
if (('' + zkl) == spcps[ihj].split('/')[0]) {
for (var jhj=0; jhj<donelist.length; jhj++) {
if (('' + donelist[jhj]) == ('' + ihj)) {
cw=eval(0 + jhj);
if (card_game.toLowerCase() == ulgame('500ish') && ('' + altcw) != '-1') { cw=eval(-1 + altcw); }
//if (card_game.toLowerCase() == '500ish' && nominal_numplayers && lasttogglenumber != ' ' && eval('' + defstyle.split('url(').length) > eval('' + maybeno(cw))) {
// if (defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0].trim().split('>')[eval(-1 + defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0].trim().split('>').length)].indexOf('' + curplayer + '.') != 0) {
// console.log('Cw=' + cw + ' and curplayer=' + curplayer + ' and Dbit=' + defstyle.split('url(')[eval(1 + eval('' + cw))].substring(0,350));
// lasttogglenumber=' ';
// }
// }
if (nominal_numplayers && lasttogglenumber.replace(' ',' ') != ' ' && eval('' + defstyle.split('url(').length) > eval('' + maybeno(cw))) {
console.log('cw=' + cw + ' and dbit=' + defstyle.split('url(')[eval(1 + eval('' + cw))].substring(0,350));
var cardlook=('' + defstyle.split('url(')[eval(1 + eval('' + cw))]);
if (cardlook.indexOf('?n=') != -1) {
//alert('cw=' + cw + ' cardlook=' + cardlook + ' ' + defstyle);
cardlook='?n=' + cardlook.split('?n=')[1].split('#')[0].split('<')[0] + '#';
console.log('cw=' + cw + ' cardlook=' + cardlook);
cardlook=cardlook.split('?n=')[1].split('#')[0].split('<')[0] + '#'; //'' + spcps[eval('' + cw)].substring(6).split('.')[0] + '.';
console.log('cw=' + cw + ' Cardlook=' + cardlook);
//alert('cw=' + cw + ' Cardlook=' + cardlook + ' ' + defstyle);
if (defstyle.indexOf(cardlook) != -1) {
xkq=cardlook.replace('?n=','').replace('#','');
}
var hh='#';
if (defstyle.indexOf('?n=' + xkq + '<') != -1 || card_game.toLowerCase() == ulgame('500ish')) { hh='<'; }
console.log('hh=' + hh + ' and xkq=' + xkq);
if (defstyle.indexOf('?n=' + xkq + hh) != -1) {
if (lasttogglenumber != ('' + xkq)) { // || card_game.toLowerCase() == '500ish') {
lasttogglenumber=('' + xkq);
//alert('cw=' + cw + ' and ihj=' + ihj + ' cardlook=' + cardlook);
//alert(defstyle.split('?n=' + eval(1 + iuh) + '#')[0].slice(-150) + '?n=' + eval(1 + iuh) + '#');
togglefrom='url(' + defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0] + '?n=' + xkq + hh + defstyle.split('?n=' + xkq + hh)[1].split(')')[0] + ')';
tfrom=togglefrom.substring(4).split('?')[0].split('#')[0].split(')')[0];
//alert(togglefrom);
tto=togglefrom.split(hh)[1].split(')')[0];
tmid='?' + togglefrom.split('?')[1].split(hh)[0] + hh;
toggleto='url(' + tto + tmid + tfrom + ')';
//if (defstyle.indexOf(togglefrom) != -1) {
//alert(togglefrom + ' to ' + toggleto);
//}
if (card_game.toLowerCase() != ulgame('500ish')) {
defstyle=defstyle.replace(togglefrom, toggleto);
console.log('t');
document.head.innerHTML+=bpmore(defstyle);
}
if (card_of_play == 0) {
if (card_game.toLowerCase() == ulgame('500ish') && thehand.indexOf(',' + hands[eval(0 + cw)] + ',') == -1) {
//alert('cw=' + cw + ' and ihj=' + ihj + ' and donelist[ihj]=' + donelist[ihj]);
//alert(hands[eval(0 + cw)] + ' before is ' + hands[eval(-1 + cw)] + ' after is ' + hands[eval(1 + cw)]);
thishand.push(hands[eval(0 + cw)]);
thehand+=hands[eval(0 + cw)] + ',';
var qs='';
for (var kjijk=0; kjijk<cards.length; kjijk++) {
if ((cards[kjijk] + '~').indexOf('?n=' + xkq + '~') != -1) {
qs=spcps[kjijk].split('/')[0];
}
}
//alert('qs=' + qs + ' and xkq=' + xkq + ' ' + cards[0]);
neweyfb='fill:black;'
if (eval('' + qs) >= 127153 && eval('' + qs) <= 127182) {
//alert('1:red');
neweyfb='stroke:red;'
}
if (hands[cw].replace(/d\./g, 'h.').indexOf('h.') != -1) {
defstyle=defstyle.replace(defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0], defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0].replace(eyfb,neweyfb).replace(eypc,neweypc).replace(tfpx,newtpfx + 'margin-top:20px;font-color:red;')).replace('>' + defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0].trim().split('>')[eval(-1 + defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0].trim().split('>').length)], '>' + String.fromCodePoint(eval('' + qs)));
} else {
defstyle=defstyle.replace(defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0], defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0].replace(eyfb,neweyfb).replace(eypc,neweypc).replace(tfpx,newtpfx + 'margin-top:20px;')).replace('>' + defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0].trim().split('>')[eval(-1 + defstyle.split('url(')[eval(1 + eval('' + cw))].split('?')[0].trim().split('>').length)], '>' + String.fromCodePoint(eval('' + qs)));
}
neweyfb='fill:black;'
console.log('u');
document.head.innerHTML+=bpmore(defstyle);
} else if (card_game.toLowerCase() == ulgame('500ish')) {
return;
}
if (card_game.toLowerCase() != ulgame('500ish')) {
susslist+='' + cw + ',';
console.log('first card');
lastcard='';
lasttoggleto=toggleto;
lasttogglefrom=togglefrom;
lasttto=tto;
lasttmid=tmid;
lasttfrom=tfrom;
if (toggleto.indexOf('images/0') != -1) {
lastcard='0' + toggleto.split('images/0')[1].split('.')[0];
} else if (toggleto.indexOf('images/1') != -1) {
lastcard='1' + toggleto.split('images/1')[1].split('.')[0];
}
}
if (card_game.toLowerCase() == ulgame('500ish')) {
console.log('increment');
curplayer++;
if (eval('' + curplayer) > eval('' + nominal_numplayers)) {
curplayer=1;
}
var wqt='> Click away Player ' + csuff + ' ' + scoresuffix + '<';
wqt=' ' + csuff + ' ' + scoresuffix + '<';
var hjg='' + curplayer;
csuff='';
for (var ipl=0; ipl<hjg.length; ipl++) {
//alert(hjg.substring(ipl,eval(1 + eval('' + ipl))) + ' has ord ' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0) + ' to ' + eval(8304 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
//defstyle=defstyle.replace(wqt,'> Click away Player ' + csuff + ' ' + scoresuffix + '<');
alert('hEre');
defstyle=defstylereplace(wqt,' ' + csuff + ' ' + scoresuffix + '<');
console.log('v');
document.head.innerHTML+=bpmore(defstyle);
if (eval('' + thishand.length) == eval('' + nominal_numplayers)) {
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
if (!in_bidding && !in_kitty) { donelistis+='' + curplayer + ','; } else if (!in_bidding) { donelistis+='' + curplayer + ','; }
setTimeout(dolaterx,2000); //alert('Player ' + curplayer + ' cards are ... ' + zsuffs[eval(-1 + curplayer)]);
}
whowon();
} else {
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
if (!in_bidding && !in_kitty) { donelistis+='' + curplayer + ','; } else if (!in_bidding) { donelistis+='' + curplayer + ','; }
//alert(12);
//alert('cuRplaYer');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
} else if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert(712);
//alert('cuRplayEr');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
}
}
} else {
//message=('Player ' + curplayer + ', your hand currently holds ' + emojistr[eval(-1 + curplayer)] + ' so do you want to keep card showing, or discard.'); // + lastcard.substring(0,2) + ' ' + ('0' + toggleto.split('images/0')[1].split('.')[0].substring(0,1)));
//if (ocp) { ocp.style.cursor='progress'; }
//setTimeout(domessagetwo,2000);
//} else {
card_of_play=1;
console.log('First card');
}
if (card_game.toLowerCase() != ulgame('500ish')) {
if (ocp) {
ocp.style.cursor='url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + String.fromCodePoint(10068,10067) + csuff + '</text></svg>") 16 0, crosshair';
if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10068,10067) + csuff);
prevsb=String.fromCodePoint(10068,10067) + csuff;
console.log('w');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10068,10067) + csuff);
prevsb=String.fromCodePoint(10068,10067) + csuff;
console.log('x');
document.head.innerHTML+=bpmore(defstyle);
}
}
if (message != '') { alert(gamescoreprefix + ' ... ' + message + ''); }
} else {
console.log('second card');
if (card_game.toLowerCase() == ulgame('500ish')) { susslist+='' + cw + ','; }
if (toggleto.indexOf('images/0') != -1) {
console.log('Second card');
if ((card_game == 'any_colour' || lastcard.substring(0,2) == ('0' + toggleto.split('images/0')[1].split('.')[0].substring(0,1))) && (card_game == 'memories' || ((card_game == 'zebra' && lastcard.substring(2,3).replace('h','black').replace('d','black').replace('c','red').replace('s','red') == toggleto.split('images/0')[1].split('.')[0].substring(1,2).replace('c','black').replace('s','black').replace('d','red').replace('h','red')) || (card_game == 'any_colour' && lastcard.substring(2,3).replace('c','black').replace('s','black').replace('d','red').replace('h','red') == toggleto.split('images/0')[1].split('.')[0].substring(1,2).replace('c','black').replace('s','black').replace('d','red').replace('h','red')) ) )) {
message=('Well done, continue Player ' + curplayer);
gamescores[eval(-1 + curplayer)]++;
if (card_game.toLowerCase() != ulgame('500ish')) {
if (ocp) {
ocp.style.cursor='url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + String.fromCodePoint(10004) + csuff + '</text></svg>") 16 0, progress';
if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10004) + csuff);
prevsb=String.fromCodePoint(10004) + csuff;
console.log('y');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10004) + csuff);
prevsb=String.fromCodePoint(10004) + csuff;
console.log('z');
document.head.innerHTML+=bpmore(defstyle);
}
}
setTimeout(domessage,2000);
//defstyle=defstyle.replace(toggleto, togglefrom.replace(/\./g,'.JUNK'));
//defstyle=defstyle.replace(lasttoggleto, lasttogglefrom.replace(/\./g,'.JUNK'));
//document.head.innerHTML+=defstyle;
} else {
//defstyle=defstyle.replace(toggleto, togglefrom);
//defstyle=defstyle.replace(lasttoggleto, lasttogglefrom);
//document.head.innerHTML+=defstyle;
console.log('Increment');
curplayer++;
if (eval('' + curplayer) > eval('' + nominal_numplayers)) { curplayer=1; }
if (eval('' + curplayer) > eval('' + gamescores.length)) { gamescores.push(0); }
message=('Next player ' + curplayer + ' goes now '); // + lastcard + ' ' + toggleto.split('images/0')[1].split('.')[0].substring(1,2) + ' vs ' + toggleto.split('images/0')[1]); // + lastcard.substring(0,2) + ' ' + ('0' + toggleto.split('images/0')[1].split('.')[0].substring(0,1)));
if (card_game.toLowerCase() != ulgame('500ish')) {
if (ocp) {
ocp.style.cursor='url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + String.fromCodePoint(10060) + csuff + '</text></svg>") 16 0, not-allowed';
if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10060) + csuff);
prevsb=String.fromCodePoint(10060) + csuff;
console.log('aa');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10060) + csuff);
prevsb=String.fromCodePoint(10060) + csuff;
console.log('bb');
document.head.innerHTML+=bpmore(defstyle);
}
}
setTimeout(domessagetwo,2000);
}
} else if (toggleto.indexOf('images/1') != -1) {
if ((card_game == 'any_colour' || lastcard.substring(0,2) == ('1' + toggleto.split('images/1')[1].split('.')[0].substring(0,1))) && (card_game == 'memories' || ((card_game == 'zebra' && lastcard.substring(2,3).replace('h','black').replace('d','black').replace('c','red').replace('s','red') == toggleto.split('images/1')[1].split('.')[0].substring(1,2).replace('c','black').replace('s','black').replace('d','red').replace('h','red')) || (card_game == 'any_colour' && lastcard.substring(2,3).replace('c','black').replace('s','black').replace('d','red').replace('h','red') == toggleto.split('images/1')[1].split('.')[0].substring(1,2).replace('c','black').replace('s','black').replace('d','red').replace('h','red')) ) )) {
message=('Well done, continue Player ' + curplayer);
gamescores[eval(-1 + curplayer)]++;
//if (ocp) { ocp.style.cursor='progress'; }
if (card_game.toLowerCase() != ulgame('500ish')) {
if (ocp) {
ocp.style.cursor='url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + String.fromCodePoint(10004) + csuff + '</text></svg>") 16 0, progress';
if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10004) + csuff);
prevsb=String.fromCodePoint(10004) + csuff;
console.log('cc');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10004) + csuff);
prevsb=String.fromCodePoint(10004) + csuff;
console.log('dd');
document.head.innerHTML+=bpmore(defstyle);
}
}
setTimeout(domessage,2000);
//defstyle=defstyle.replace(toggleto, togglefrom.replace(/\./g,'.JUNK'));
//defstyle=defstyle.replace(lasttoggleto, lasttogglefrom.replace(/\./g,'.JUNK'));
//document.head.innerHTML+=defstyle;
} else {
//defstyle=defstyle.replace(toggleto, togglefrom);
//defstyle=defstyle.replace(lasttoggleto, lasttogglefrom);
//document.head.innerHTML+=defstyle;
console.log('inCrement');
curplayer++;
if (eval('' + curplayer) > eval('' + nominal_numplayers)) { curplayer=1; }
if (eval('' + curplayer) > eval('' + gamescores.length)) { gamescores.push(0); }
message=('Next player ' + curplayer + ' goes now '); // + lastcard + ' ' + toggleto.split('images/1')[1].split('.')[0].substring(1,2) + ' vs ' + toggleto.split('images/1')[1]); // + lastcard.substring(0,2) + ' ' + ('1' + toggleto.split('images/1')[1].split('.')[0].substring(0,1)));
if (card_game.toLowerCase() != ulgame('500ish')) {
if (ocp) {
ocp.style.cursor='url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + String.fromCodePoint(10060) + csuff + '</text></svg>") 16 0, not-allowed';
if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10060) + csuff);
prevsb=String.fromCodePoint(10060) + csuff;
console.log('ee');
document.head.innerHTML+=bpmore(defstyle);
}
} else if (defstyle.indexOf('data:image/svg') != -1) {
defstyle=defstyle.replace(prevsb, String.fromCodePoint(10060) + csuff);
prevsb=String.fromCodePoint(10060) + csuff;
console.log('ff');
document.head.innerHTML+=bpmore(defstyle);
}
}
setTimeout(domessagetwo,2000);
}
}
lasttogglenumber=' ';
lastcard='';
//lasttto='';
//lasttmid='';
//lasttfrom='';
//lasttoggleto='';
//lasttogglefrom='';
card_of_play=0;
}
}
}
}
}
}
}
}
}
//console.log('zkq=' + zkq + ' asq.length=' + asq.length + ' sq.length=' + sq.length);
//alert('zkq=' + zkq);
da='' + asq[eval(0 + zkq)];
//console.log('da=' + da);
//alert('da=' + da);
dp='' + given + sq[eval('' + zkq)];
//console.log('dp=' + dp);
//alert('dp=' + dp);
def=String.fromCodePoint(eval('' + zkl));
//documenttitleeq(ps + os + '/' + pg + ' is User: Score/Goes');
// window.close(); // remove from defstyle created background-image list
//document.head.innerHTML+="<style> html { background:URL('" + cards[zkl] + "'); background-size:contain; background-repeat:no-repeat; } </style>";
if (zkq != lastzkq || zkl != lastzkl) {
lastzkq=zkq;
lastzkl=zkl;
pa();
}
}
}
function StringsearchCodePoint(inumis) {
for (var igf=0; igf<spcps.length; igf++) {
//alert('inumis=' + inumis + ' ... ' + String.fromCodePoint(eval('' + spcps[igf].split('/')[0])));
if (inumis.indexOf('' + String.fromCodePoint(eval('' + spcps[igf].split('/')[0]))) != -1) {
if (spcps[igf].split('.gif')[0].slice(-1) == 'd') {
return inumis + ' ' + String.fromCodePoint(9830,65039); // ♦ ️
} else if (spcps[igf].split('.gif')[0].slice(-1) == 'h') {
return inumis + ' ' + String.fromCodePoint(10084,65039); // ❤ ️ ❤ ️
} else if (spcps[igf].split('.gif')[0].slice(-1) == 'c') {
return inumis + ' ' + String.fromCodePoint(9827); // ❤ ️ ❤ ️
} else if (spcps[igf].split('.gif')[0].slice(-1) == 's') {
return inumis + ' ' + String.fromCodePoint(9824); // ❤ ️ ❤ ️
} // ♣
}
}
return inumis;
}
function StringreCodePoint(inumis) {
for (var igf=0; igf<spcps.length; igf++) {
if (('' + inumis) == spcps[igf].split('/')[0]) {
if (spcps[igf].split('.gif')[0].slice(-1) == 'd') {
return 'style=color:red; '; // ♦ ️
} else if (spcps[igf].split('.gif')[0].slice(-1) == 'h') {
return 'style=color:red; '; // ❤ ️
} else if (spcps[igf].split('.gif')[0].slice(-1) == 'c') {
return 'style=color:black; '; // ❤ ️
} else if (spcps[igf].split('.gif')[0].slice(-1) == 's') {
return 'style=color:black; '; // ❤ ️
} //
}
}
return '';
}
function nominalemojisuit(ptrumpsare) {
if (ptrumpsare == 'd') {
return '♦️'; //String.fromCodePoint(9830,65039); // ♦ ️
} else if (ptrumpsare == 'h') {
return '❤️'; //String.fromCodePoint(10084,65039); // ❤ ️
} else if (ptrumpsare == 'c') {
return '♣'; //String.fromCodePoint(9827); // ❤ ️ ❤ ️
} else if (ptrumpsare == 's') {
return '♠'; //String.fromCodePoint(9824); // ❤ ️ ❤ ️
} //
return '';
}
function emojisuit() {
if (trumpsare == 'd') {
return String.fromCodePoint(9830,65039); // ♦ ️
} else if (trumpsare == 'h') {
return String.fromCodePoint(10084,65039); // ❤ ️
} else if (trumpsare == 'c') {
return String.fromCodePoint(9827); // ❤ ️ ❤ ️
} else if (trumpsare == 's') {
return String.fromCodePoint(9824); // ❤ ️ ❤ ️
} //
return '';
}
function StringfromCodePoint(inumis) {
for (var igf=0; igf<spcps.length; igf++) {
if (('' + inumis) == spcps[igf].split('/')[0]) {
if (spcps[igf].split('.gif')[0].slice(-1) == 'd') {
return String.fromCodePoint(eval('' + inumis)) + ' ' + String.fromCodePoint(9830,65039); // ♦ ️
} else if (spcps[igf].split('.gif')[0].slice(-1) == 'h') {
return String.fromCodePoint(eval('' + inumis)) + ' ' + String.fromCodePoint(10084,65039); // ❤ ️
} else if (spcps[igf].split('.gif')[0].slice(-1) == 'c') {
return String.fromCodePoint(eval('' + inumis)) + ' ' + String.fromCodePoint(9827); // ❤ ️ ❤ ️
} else if (spcps[igf].split('.gif')[0].slice(-1) == 's') {
return String.fromCodePoint(eval('' + inumis)) + ' ' + String.fromCodePoint(9824); // ❤ ️ ❤ ️
} //
}
}
return String.fromCodePoint(eval('' + inumis));
}
function bStringfromCodePoint(jgf) {
var stile='', igf=0;
for (var kgf=0; kgf<spcps.length; kgf++) {
if (('' + spcps[kgf]).split('/')[0] == ('' + jgf)) { igf=kgf; }
}
stile=(('' + spcps[eval('' + igf)]).split('.')[0].slice(-3).substring(0,2).toLowerCase().replace('00','Joker aka ').replace('01','Ace of ').replace('02','2 of ').replace('03','3 of ').replace('04','4 of ').replace('05','5 of ').replace('06','6 of ').replace('07','7 of ').replace('08','8 of ').replace('09','9 of ').replace('10','10 of ').replace('11','Jack of ').replace('12','Queen of ').replace('13','King of ') + ('' + spcps[eval('' + igf)]).split('.')[0].slice(-1).replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's').toLowerCase();
return stile;
}
function aStringfromCodePoint(igf, idx, basis) {
var stile='';
stile=(('' + spcps[eval('' + igf)]).split('.')[0].slice(-3).substring(0,2).toLowerCase().replace('00','Joker aka ').replace('01','Ace of ').replace('02','2 of ').replace('03','3 of ').replace('04','4 of ').replace('05','5 of ').replace('06','6 of ').replace('07','7 of ').replace('08','8 of ').replace('09','9 of ').replace('10','10 of ').replace('11','Jack of ').replace('12','Queen of ').replace('13','King of ') + ('' + spcps[eval('' + igf)]).split('.')[0].slice(-1).replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's').toLowerCase();
if (1 == 5 && basis.indexOf('.11') == -1) {
if (('' + wsuffs[eval('' + idx)]).indexOf(basis.split(':')[0]) != -1) {
wsuffs[eval('' + idx)]=wsuffs[eval('' + idx)].replace(basis.split(':')[0] + basis.split(basis.split(':')[0])[1].split(basis.split('.')[0] + '.')[0], ' ');
}
wsuffs[eval('' + idx)]+=('' + basis.replace(basis.split(':')[1].split(',')[0], stile).split(',')[0]);
//alert('basis=' + basis + ' ... idx=' + idx + ' ... ' + wsuffs[eval('' + idx)] + ' ... ' + ysuffs[eval('' + idx)]);
}
return basis;
}
function athn() {
document.head.innerHTML+=bpmore(defstyle);
}
function sentclick() {
var togglefrom='', toggleto='', tfrom='', tto='', tmid='', iok=true, icw=0, qprevcsuff='';
var remote=false;
var tlen=0;
var ihjk=0;
var gono=false;
var froms='>1.1<', tos='>1.1<';
var carddesc='', defval=0, ixc, blanks=' ';
var bdl=[];
var kjn=0;
var iskitty=false;
var bcp='';
//alert('here0');
if (sentanswer.indexOf('.') != -1) {
//alert('here why');
in_bidding=false;
in_kitty=false;
console.log('in_kitty=FaLse curplayer=' + curplayer);
clater(); //document.head.innerHTML+='<style> html { cursor: url("data:image/svg+xml;utf8,<svg xmlns=' + "'" + 'http://www.w3.org/2000/svg' + "'" + ' width=' + "'" + '96' + "'" + ' height=' + "'" + '48' + "'" + ' viewport=' + "'" + '0 0 100 100' + "'" + ' style=' + "'" + brad + 'background-color:rgba(255,0,0,0.1);' + eyfb + 'font-family:Verdana;font-size:' + tfpx + "'" + '><text y=' + "'" + eypc + "'" + '>' + emojisuit() + '</text></svg>") 16 0, pointer; } </style>';
if (('' + curplayer) != ('' + sentanswer.split('.')[0])) {
sentanswer='';
} else if (('' + curplayer) == ('' + sentanswer.split('.')[0])) {
var iuh=eval(-1 - eval(eval('' + nominal_numplayers) - eval('' + sentanswer.split('.')[0])) + eval(eval('' + nominal_numplayers) * eval('' + sentanswer.split('.')[1])) );
if (eval('' + oplistname.length) > eval('' + iuh) && card_game.toLowerCase() == ulgame('500ish')) {
if (oplistname[iuh] == '') {
popupsim(eval(('' + opltlistt[iuh]).split('.')[1]), eval(('' + opltlistl[iuh]).split('.')[1]));
} else {
if (eval(1 + eval(iuh % nominal_numplayers)) == eval('' + curplayer) && iuh != lastsq) {
lastsq=iuh;
//alert(defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0]);
var fgs=defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0].split('<!-- ');
var zfgs=defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0].split(' ?n=');
if (fgs.length > 1 && zfgs.length > 1) {
var repthis='>' + zfgs[0].split('>')[eval(-1 + zfgs[0].split('>').length)] + ' ';
var cde=fgs[1].split(' ')[1].split('-')[0];
if (card_game.toLowerCase() == ulgame('500ish') && thehand.indexOf(cde) == -1) {
if (lastcde == cde && 1 == 7) {
iok=false;
} else {
var iicw=0;
for (var jjcw=0; jjcw<hands.length; jjcw++) {
if (hands[jjcw].slice(-3) == cde) { iicw=jjcw; icw=iicw; }
}
if (eval('' + defstyle.split('url(').length) > eval('' + maybeno(iicw))) {
iok=true;
lastcde='';
} else {
lastcde=cde;
iok=false;
}
}
}
if (iok) {
for (var iz=0; iz<zsuffs.length; iz++) {
zsuffs[iz]=zsuffs[iz].replace(String.fromCodePoint(eval(fgs[1].split(' ')[0].split('-')[0])), ' ');
ysuffs[iz]=ysuffs[iz].replace(String.fromCodePoint(eval(fgs[1].split(' ')[0].split('-')[0])) + ',', '');
}
neweyfb='fill:black;'
if (eval(fgs[1].split(' ')[0].split('-')[0]) >= 127153 && eval(fgs[1].split(' ')[0].split('-')[0]) <= 127182) {
//alert('2:red');
neweyfb='stroke:red;'
}
console.log('repthis=' + repthis + ' gets replaced by >' + String.fromCodePoint(eval(fgs[1].split(' ')[0].split('-')[0])) + ' ' + defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0]);
if (defstyle.indexOf(repthis) == -1) {
alert('oops ' + defstyle.indexOf(repthis.trim()));
} else if (eval('' + defstyle.split(repthis).length) != 2) {
alert('Oops ' + defstyle.indexOf(repthis.trim()));
}
defstyle=defstyle.replace(repthis,'>' + String.fromCodePoint(eval(fgs[1].split(' ')[0].split('-')[0])) + ' ');
console.log('repthis=' + repthis + ' gets replaced by >' + String.fromCodePoint(eval(fgs[1].split(' ')[0].split('-')[0])) + ' ' + defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0]);
if (defstyle.indexOf(repthis) != -1) {
alert('ooPs ' + defstyle.indexOf(repthis.trim()));
} else if (eval('' + defstyle.split(repthis).length) != 1) {
alert('OopS ' + defstyle.indexOf(repthis.trim()));
}
defstyle=defstyle.replace(defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0], defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0].replace(eyfb,neweyfb).replace(eypc,neweypc).replace(tfpx,newtfpx + 'margin-top:20px;font-color:red;'));
neweyfb='fill:black;'
if (1 == 5) { document.head.innerHTML+=bpmore(defstyle); }
//document.head.innerHTML+=defstyle;
if (card_game.toLowerCase() == ulgame('500ish') && thehand.indexOf(cde) == -1) {
//alert('cw=' + cw + ' and ihj=' + ihj + ' and donelist[ihj]=' + donelist[ihj]);
//alert(hands[icw] + ' before is ' + hands[icw] + ' after is ' + hands[icw]);
thishand.push(hands[icw]);
thehand+=hands[icw] + ',';
}
console.log('increMent ' + donelistis);
qprevcsuff=csuff;
curplayer++;
if (eval('' + curplayer) > eval('' + nominal_numplayers)) {
curplayer=1;
}
var wqt='> Click away Player ' + csuff + ' ' + scoresuffix + '<';
wqt=' ' + csuff + ' ' + scoresuffix + '<';
var hjg='' + curplayer;
csuff='';
for (var ipl=0; ipl<hjg.length; ipl++) {
//alert(hjg.substring(ipl,eval(1 + eval('' + ipl))) + ' has ord ' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0) + ' to ' + eval(8304 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
//defstyle=defstyle.replace(wqt,'> Click away Player ' + csuff + ' ' + scoresuffix + '<');
// defstyle=defstylereplace(wqt,' ' + csuff + ' ' + scoresuffix + '<'); // huh
defstyle=defstylereplace(' ' + qprevcsuff,' ' + csuff);
console.log('hh');
//alert('hh');
document.head.innerHTML+=bpmore(defstyle);
if (eval('' + thishand.length) == eval('' + nominal_numplayers)) {
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
if (!in_bidding && !in_kitty) { passcnt=0; donelistis+='' + curplayer + ','; }
setTimeout(dolaterx,2000); //alert('Player ' + curplayer + ' cards are ... ' + zsuffs[eval(-1 + curplayer)]);
}
passcnt=0;
whowon();
} else {
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
if (!in_bidding && !in_kitty) { donelistis+='' + curplayer + ','; }
//alert(15);
//alert('cuRplayeR ' + curplayer);
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
} else if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert(815);
//alert('cuRpLayeR ' + curplayer);
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
}
}
//} else {
//}
// }
sentanswer='';
}
} else {
//alert('here xhuh');
popupsim(eval(('' + opltlistt[iuh]).split('.')[1]), eval('' + oplistname[iuh]));
}
}
}
} else {
//alert('here zhuh');
popupsim(eval(('' + opltlistt[iuh]).split('.')[1]), eval(('' + opltlistl[iuh]).split('.')[1]));
}
}
// }
// }
//alert('here yhuh');
sentanswer='';
} else {
//alert('here huh');
//alert('here1');
if (eval('' + sentanswer.length) < 3 || eval('' + sentanswer.length) > 4) {
//alert('here2');
if (in_bidding) {
ma=sentanswer;
//alert('sent ma=' + ma);
if (ma.toLowerCase().replace('redo','pass').replace('doub','pass').indexOf('pass') == 0) {
if (ma.toLowerCase().indexOf('pass') == 0) {
passcnt++;
passcnt+=xpass;
xpass=0;
} else if (ma.toLowerCase().indexOf('redo') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 2) { doublefactor=4; rsdn=" style='display:none;'"; dsdn=" style='display:none;'"; }
} else if (ma.toLowerCase().indexOf('doub') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 1) { doublefactor=2; dsdn=" style='display:none;'"; rsdn=""; }
}
console.log('passcnt=' + passcnt + ' and ma=' + ma + ' and GD=' + gd);
//ma=' ';
//sentanswer=' ';
//gd=null;
if (passcnt == 4 || passcnt == 3) {
if (passcnt == 4 && cbid.toLowerCase().replace('pass','none') == 'none') { alert('Reload.'); location.href=document.URL.split('#')[0]; }
if (passcnt == 4) { in_bidding=false; }
if (card_game.toLowerCase() != 'bridge' || 1 == 1) { in_kitty=true; }
console.log('in_kitty=True');
if (passcnt == 3) {
if (cbid.toLowerCase().indexOf('ope') == 0 || card_game.toLowerCase() == 'bridge') {
omh=eval('' + cbidby);
omc=eval(-2 + eval('' + cbidby));
if (omc < 1) { omc+=4; }
} else {
omh=-1;
omc=-1;
}
bidplayer++;
if (eval('' + bidplayer) > eval('' + nominal_numplayer)) { bidplayer=1; }
var prevcb=' ' + cbid + ' ';
//cbid=bids[eval(-1 + eval('' + cbidby))];
//alert('lead bidplayer=' + cbidby);
//cbidby=eval('' + cbidby);
//alert('lead cbidby=' + cbidby + ' cbid=' + cbid);
var jsbit=' ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' ';
for (var jihgs=0; jihgs<ssuffs.length; jihgs++) {
if (ssuffs[jihgs].indexOf('Bidding proceeds ') != -1) {
ssuffs[jihgs]='Bidding proceeds after last ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' leading bid. ';
msuffs[jihgs]=msuffs[jihgs].replace(prevcb, ' ' + cbid + ' ').replace(prevcb, ' ' + cbid + ' ');
ssuffs[jihgs]=ssuffs[jihgs].replace(prevcb, ' ' + cbid + ' ').replace(prevcb, ' ' + cbid + ' ');
}
}
//cbidrank=eval(-1 + eval('' + bidplayer));
}
curplayer=eval('' + cbidby);
lastwinner=eval('' + cbidby);
donelistis=(',1,2,3,4,').replace(',' + lastwinner + ',', ',');
if (cbid.trim().slice(-1).toLowerCase() == 'n' || cbid.toLowerCase().indexOf('mis') != -1) {
trumpsare='0';
} else {
trumpsare=cbid.trim().slice(-1).toLowerCase();
}
if (trumpsare != origt) {
hands=orighands;
var ixc=0, bdl=[], kjn=0;
var blanks=' ';
for (ixc=0; ixc<nominal_numplayers; ixc++) {
zsuffs[ixc]='';
ysuffs[ixc]='';
//wsuffs[ixc]='';
}
for (ixc=0; ixc<hands.length; ixc++) {
bdl=hands[ixc].split(' ');
if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('000') == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,17);
//alert(hands[ixc].replace(' ',blanks.substring(0,20)).replace(/\ /g,'x'));
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,33));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 33'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('11' + trumpsare) == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,17);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,31));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 31'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('11' + trumpsare.replace('c','S').replace('s','C').replace('d','H').replace('h','D').toLowerCase()) == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,16);
//alert('Found right bower as ' + bdl[eval(-1 + eval('' + bdl.length))]);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,30));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 30'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].slice(-1) == trumpsare) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,13);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,27));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 27'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'');
hands[ixc]=hands[ixc];
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 0'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
}
}
zsuff=zsuffs[eval(-1 + curplayer)];
//orighands=hands;
origt=trumpsare;
}
var xhjg='' + lastwinner;
var xprevcsuff=csuff;
csuff='';
for (var xipl=0; xipl<xhjg.length; xipl++) {
//alert(hjg.substring(ipl,eval(1 + eval('' + ipl))) + ' has ord ' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0) + ' to ' + eval(8304 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + xhjg.substring(ipl,eval(1 + eval('' + xipl))).charCodeAt(0)) - 48)));
}
thehand=',';
var aota='';
if ((eval('' + emailsms.length) < 1 || eval('' + emailsms.length) < 2 || eval('' + emailsms.length) < 3 || eval('' + emailsms.length) < 4)) {
aota=' (players not ' + cbidby + ' please turn away)';
deftwo=5000;
}
if (cbid.slice(-1).toLowerCase().replace('h','d') == 'd') {
sss=' leading ' + cbidby + ' bid ' + dr(cbid) + ' ' + emojisuit() + aota + ' ';
} else {
sss=' leading ' + cbidby + ' bid ' + dr(cbid) + ' ' + emojisuit() + aota;
}
sss=sss.replace('è', String.fromCodePoint(232)).replace('open_', 'open ').replace('è', String.fromCodePoint(232)).replace('open_', 'open ');
if (sss != '' && defstyle.indexOf(sss) == -1 && defstyle.indexOf(' leading ') == -1 && !sssdone) {
sssdone=true;
//defstyle=defstyle.replace('Click away Player ' + xprevcsuff + '', 'Click away Player ' + csuff + ' ' + sss); //.replace('></text>','>' + sss + '</text>');
defstyle=defstylereplace(' ' + xprevcsuff + '', ' ' + csuff); //.replace('></text>','>' + sss + '</text>');
defstyle=defstyle.replace(' ' + csuff + '', ' ' + csuff + ' ' + sss); //.replace('></text>','>' + sss + '</text>');
dhi=dhi.replace(xprevcsuff,csuff + ' ' + sss);
} else {
//defstyle=defstyle.replace('Click away Player ' + xprevcsuff + '', 'Click away Player ' + csuff + '');
defstyle=defstylereplace(' ' + xprevcsuff + '', ' ' + csuff + '');
dhi=dhi.replace(xprevcsuff,csuff);
}
console.log('ii');
document.head.innerHTML+=bpmore(defstyle);
if (aota != '') {
defstyle=defstyle.replace(aota, '');
sss=sss.replace(aota, '');
setTimeout(athn, 4000);
}
var thirty=30;
var threeis=' ';
var eis=0;
var ftyis=40;
var stitle='';
var sstyle='style=color:black; ';
var ostyle='style=color:red; ';
//alert('hands.length=' + hands.length + ' hands[40]=' + hands[40]);
if (card_game.toLowerCase() == 'bridge') { ftyis=52; }
for (ixc=0; ixc<hands.length; ixc++) {
bdl=hands[ixc].split(' ');
if (eval('' + ixc) >= ftyis) {
eis=0;
stitle='';
//alert('0:' + hands[ixc] + '!');
threeis=hands[ixc].slice(-3);
//alert('threeis=' + threeis + ' ... ' + hands[ixc] + '!');
for (ihjk=0; ihjk<spcps.length; ihjk++) {
if (spcps[ihjk].indexOf(threeis + '.') != -1) {
eis=eval('' + spcps[ihjk].split('/')[0]);
stitle='title="Swap in ' + spcps[ihjk].split('.')[0].slice(-3).substring(0,2).toLowerCase().replace('00','Joker aka ').replace('01','Ace of ').replace('02','Two of ').replace('03','Three of ').replace('04','Four of ').replace('05','Five of ').replace('06','Six of ').replace('07','Seven of ').replace('08','Eight of ').replace('09','Nine of ').replace('10','Ten of ').replace('11','Jack of ').replace('12','Queen of ').replace('13','King of ') + spcps[ihjk].split('.')[0].slice(-1).replace('c','Club').replace('d','Diamond').replace('s','Spade').replace('h','Heart').replace('0','No Trump') + 's' + '" ';
}
}
//alert(String.fromCodePoint(eis) + ' threeis=' + threeis + 'zsuffs[]=' + zsuffs[eval(-1 + curplayer)]);
if (tds_kitty == '' && card_game.toLowerCase() != 'bridge') {
kemoji=String.fromCodePoint(eis);
tds_kitty='<tr id=trkitty><td>Kitty Card</td><td><select ' + stitle + StringreCodePoint(eis) + 'name=swap1><option value="">1 ' + StringfromCodePoint(eis) + ' ... in for ...</option></SELECT></td></TR>';
thirty--;
thirty--;
for (ihjk=0; ihjk<10; ihjk++) {
tds_kitty=tds_kitty.replace('</SELECT>','<option value="+' + curplayer + '.11,-' + curplayer + '.' + eval(1 + eval('' + ihjk)) + '">' + StringsearchCodePoint(zsuffs[eval(-1 + curplayer)].trim().split(' ')[eval('' + ihjk)]) + '</option></SELECT>');
}
tds_kitty=tds_kitty.replace('</SELECT>','</select>');
} else if (card_game.toLowerCase() != 'bridge') {
tlen=eval(-1 + eval('' + tds_kitty.split('</td>').length));
//alert('tlen=' + tlen + ' ' + tds_kitty + ' ' + zsuffs[eval(-1 + curplayer)].trim().split(' ').length);
kemoji+=',' + String.fromCodePoint(eis);
tds_kitty=tds_kitty.replace('</td></TR>','</td><td><select ' + stitle + StringreCodePoint(eis) + 'name=swap' + tlen + '><option value="">' + tlen + ' ' + StringfromCodePoint(eis) + ' ... in for ...</option></SELECT></td></TR>');
thirty--;
for (ihjk=0; ihjk<10; ihjk++) {
tds_kitty=tds_kitty.replace('</SELECT>','<option value="+' + curplayer + '.1' + tlen + ',-' + curplayer + '.' + eval(1 + eval('' + ihjk)) + '">' + StringsearchCodePoint(zsuffs[eval(-1 + curplayer)].trim().split(' ')[eval('' + ihjk)]) + '</option></SELECT>');
}
tds_kitty=tds_kitty.replace('</SELECT>','</select>');
}
}
if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('000') == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,17);
//alert(hands[ixc].replace(' ',blanks.substring(0,20)).replace(/\ /g,'x'));
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,33));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 33'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('11' + trumpsare) == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,17);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,31));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 31'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('11' + trumpsare.replace('c','S').replace('s','C').replace('d','H').replace('h','D').toLowerCase()) == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,16);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,30));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 30'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].slice(-1) == trumpsare) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,13);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,27));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 27'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'');
hands[ixc]=hands[ixc];
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 0'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
}
//alert(tds_kitty);
}
tds_kitty=tds_kitty.replace('</td></TR>','</td><td colspan=' + thirty + '></td></tr>');
for (var ihgs=0; ihgs<hsuffs.length; ihgs++) {
zsuffs[eval(0 + eval('' + ihgs))]=zsuffs[eval(0 + eval('' + ihgs))].split(' ' + eval('' + ihgs) + doteleven + ':')[0];
ysuffs[eval(0 + eval('' + ihgs))]=ysuffs[eval(0 + eval('' + ihgs))].split(' ' + eval('' + ihgs) + doteleven + ':')[0];
if (hsuffs[ihgs].indexOf('</thead>') != -1) {
hsuffs[ihgs]=hsuffs[ihgs].replace('</thead>', tds_kitty + '</thead>');
}
}
if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert('7');
if (('' + emailsms[eval('' + curplayer)]).trim() != '') {
//alert('88:' + in_kitty + in_bidding + ' curplayer=' + curplayer + ' ' + msuffs[eval(-1 + curplayer)]);
remote=true;
if (donelistis.indexOf(',' + curplayer + ',') == -1 || (passcnt == 3 && 1 == 6)) { // new first if bit
// alert('CuRplayer');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
} else {
//alert('cURplayer');
myalertmc(msuffs[eval(-1 + curplayer)],rsuffs[eval(-1 + curplayer)]); //retcom(msuffs[eval(-1 + curplayer)], ' '); //rsuffs[eval(-1 + curplayer)]);
}
}
}
//alert('9');
if (1 == 1) {
if (!remote) {
//alert('9 ' + in_bidding + in_kitty);
//alert('CuRplayEr');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
}
}
} else {
bidplayer++;
if (eval('' + bidplayer) > eval('' + nominal_numplayer)) { bidplayer=1; }
curplayer=eval('' + bidplayer);
if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert('7');
if (('' + emailsms[eval('' + curplayer)]).trim() != '') {
//alert('8');
remote=true;
if (donelistis.indexOf(',' + curplayer + ',') == -1 || (passcnt == 3 && 1 == 6)) { // new first if bit2
//alert('CuRplayer');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
} else {
//alert('Straight');
retcom(msuffs[eval(-1 + bidplayer)], rsuffs[eval(-1 + bidplayer)]);
}
}
}
//alert('9');
if (1 == 1) {
//alert('CuRplayER');
if (!remote) { myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)])); }
}
}
} else { // if (ma.trim() != '') {
doublefactor=1;
if (card_game.toLowerCase() == 'bridge') { rsdn=" style='display:none;'"; dsdn=""; }
passcnt=0;
donelistis=',';
sss='';
sssdone=false;
defstyle=defstyle.replace(' leading ',' lead ');
//alert('becomes true');
in_bidding=true;
in_kitty=false;
if (card_game == ulgame('500ISH')) { if (scoresuffix != '') { progressbar(scoresuffix); } else if (jsa == '') { progressbar('0.0,0.0,0.0,0.0'); } else { progressbar(jsa); } }
console.log('in_kitty=FalsE');
//bids[eval(-1 + eval('' + bidplayer))]=ma.trim(); // ?
var thisbidrank=-1;
for (var ibidis=0; ibidis<bids.length; ibidis++) {
if (ma.substring(0,3).toLowerCase() == (bids[ibidis] + ' ').substring(0,3).toLowerCase()) {
//alert('found bid ' + bids[ibidis]);
thisbidrank=ibidis;
if (eval('' + thisbidrank) > eval('' + cbidrank)) {
//alert('found relevant bid ' + bids[ibidis]);
var jprevcb=' ' + cbid + ' ';
cbid=bids[ibidis];
dsdn='';
cbidby=eval(0 + eval('' + bidplayer));
if (cbid.toLowerCase().indexOf('ope') == 0 || card_game.toLowerCase() == 'bridge') {
omh=eval('' + cbidby);
omc=eval(-2 + eval('' + cbidby));
if (omc < 1) { omc+=4; }
} else {
omh=-1;
omc=-1;
}
for (var icx=1; icx<=eval('' + nominal_numplayers); icx++) {
if (icx != cbidby) {
hsuffs[eval(-1 + icx)]='';
}
}
//sss=' leading ' + cbidby + ' bid ' + cbid + ' ' + emojisuit();
//alert('cbid=' + cbid + ' and ma=' + ma + ' and cbidby=' + cbidby);
//alert('2');
var jjsbit=' ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' ';
for (var kjihgs=0; kjihgs<ssuffs.length; kjihgs++) {
if (ssuffs[kjihgs].indexOf('Bidding proceeds ') != -1) {
ssuffs[kjihgs]='Bidding proceeds after last ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' leading bid. ';
msuffs[kjihgs]=msuffs[kjihgs].replace(jprevcb, ' ' + cbid + ' ').replace(jprevcb, ' ' + cbid + ' ');
}
}
cbidrank=ibidis;
//alert('3');
bidplayer++;
//alert('4');
nominal_numplayer=4;
if (eval('' + bidplayer) > eval('' + nominal_numplayer)) { bidplayer=1; }
//alert('5');
curplayer=eval('' + bidplayer);
//alert('sent bid=' + cbid + ' and onto bidplayer=' + curplayer);
}
// send next
//alert('6');
if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert('7');
if (('' + emailsms[eval('' + curplayer)]).trim() != '') {
//alert('8');
remote=true;
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
//alert('CURplaYeR ' + curplayer);
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
} else {
alert('STRAIGHT');
retcom(msuffs[eval(-1 + bidplayer)], rsuffs[eval(-1 + bidplayer)]);
}
}
}
//alert('9');
if (1 == 1) {
//alert('CURplayeR ' + curplayer);
if (!remote) { myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)])); } // here maybe
}
}
}
}
}
}
sentanswer='';
}
//alert('here xhuh');
}
function clickedmaybe() {
var togglefrom='', toggleto='', tfrom='', tto='', tmid='', icw=0, iok=true, qprevcsuff='';
if (('' + lastiourx) != '-1' && ('' + lastioury) != '-1') {
iourx=lastiourx;
ioury=lastioury;
iourx=-1;
ioury=-1;
}
if (('' + iourx) != '-1' && ('' + ioury) != '-1') {
//alert(iourx);
if (!oplist[0] || 7 == 7) {
if (card_game.toLowerCase() == ulgame('500ish')) { console.log('here at x=' + iourx + ' and y=' + ioury + ' ' + opltlistl[0] + ',' + opltlistt[0]); }
for (var iuh=0; iuh<opltlistl.length; iuh++) {
if (eval('' + iourx) >= eval('' + opltlistl[iuh]) && eval('' + ioury) >= eval('' + opltlistt[iuh])) {
if (card_game.toLowerCase() == ulgame('500ish')) { console.log('passed left and top test'); }
if (eval('' + iourx) <= eval(eval('' + owidth) + eval('' + opltlistl[iuh])) && eval('' + ioury) <= eval(eval('' + oheight) + eval('' + opltlistt[iuh]))) {
if (card_game.toLowerCase() == ulgame('500ish')) { altcw=eval(1 + iuh); console.log(' ... and other ' + curplayer); }
if (eval('' + oplistname.length) > eval('' + iuh) && card_game.toLowerCase() == ulgame('500ish')) {
if (oplistname[iuh] == '') {
//alert('pop');
popupsim(eval(('' + opltlistt[iuh]).split('.')[1]), eval(('' + opltlistl[iuh]).split('.')[1]));
} else {
if (eval(1 + eval(iuh % nominal_numplayers)) == eval('' + curplayer) && iuh != lastsq) {
lastsq=iuh;
//alert(defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0]);
var fgs=defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0].split('<!-- ');
var zfgs=defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0].split(' ?n=');
if (fgs.length > 1 && zfgs.length > 1) {
var repthis='>' + zfgs[0].split('>')[eval(-1 + zfgs[0].split('>').length)] + ' ';
var cde=fgs[1].split(' ')[1].split('-')[0];
if (card_game.toLowerCase() == ulgame('500ish') && thehand.indexOf(cde) == -1) {
if (lastcde == cde && 1 == 7) {
iok=false;
lastsq=-1;
} else {
var iicw=0;
for (var jjcw=0; jjcw<hands.length; jjcw++) {
if (hands[jjcw].slice(-3) == cde) { iicw=jjcw; icw=iicw; }
}
//alert('cde=' + cde + ' thehand=' + thehand + ' iicw=' + iicw + ' lessmaybeno(icw)=' + lessmaybeno(iicw));
if (eval('' + defstyle.split('url(').length) > eval('' + lessmaybeno(iicw))) {
iok=true;
lastcde='';
console.log('found it');
in_bidding=false;
if (eval('' + emailsms.length) > eval(-1 + curplayer)) { if (emailsms[eval(-1 + curplayer)].trim() == '') { in_kitty=(donelistis.indexOf(',' + curplayer + ',') == -1); } else { in_kitty=false; } } else { in_kitty=(donelistis.indexOf(',' + curplayer + ',') == -1); }
} else {
iok=false;
lastcde=cde;
lastsq=-1;
return;
}
}
}
for (var iz=0; iz<zsuffs.length; iz++) {
zsuffs[iz]=zsuffs[iz].replace(String.fromCodePoint(eval(fgs[1].split(' ')[0].split('-')[0])), ' ');
ysuffs[iz]=ysuffs[iz].replace(String.fromCodePoint(eval(fgs[1].split(' ')[0].split('-')[0])) + ',', '');
}
neweyfb='fill:black;'
if (eval(fgs[1].split(' ')[0].split('-')[0]) >= 127153 && eval(fgs[1].split(' ')[0].split('-')[0]) <= 127182) {
//alert('3:red');
neweyfb='stroke:red;'
}
//alert(defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0].replace(eyfb,neweyfb).replace(eypc,neweypc).replace(tfpx,newtfpx + 'margin-top:20px;font-color:red;').replace(repthis,'>' + String.fromCodePoint(eval(fgs[1].split(' ')[0].split('-')[0]))));
defstyle=defstyle.replace(defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0], defstyle.split('url(')[eval(1 + iuh)].split('</svg>')[0].replace(eyfb,neweyfb).replace(eypc,neweypc).replace(tfpx,newtfpx + 'margin-top:20px;font-color:red;').replace(repthis,'>' + String.fromCodePoint(eval(fgs[1].split(' ')[0].split('-')[0])) + ' '));
neweyfb='fill:black;'
console.log('jj');
document.head.innerHTML+=bpmore(defstyle);
if (card_game.toLowerCase() == ulgame('500ish') && thehand.indexOf(cde) == -1) {
icw=0;
for (var jcw=0; jcw<hands.length; jcw++) {
if (hands[jcw].slice(0-3) == cde) { icw=jcw; }
}
//alert('cw=' + cw + ' and ihj=' + ihj + ' and donelist[ihj]=' + donelist[ihj]);
//alert(hands[icw] + ' before is ' + hands[icw] + ' after is ' + hands[icw]);
thishand.push(hands[icw]);
thehand+=hands[icw] + ',';
}
console.log('incremEnt');
curplayer++;
if (eval('' + curplayer) > eval('' + nominal_numplayers)) {
curplayer=1;
}
qprevcstuff=csuff;
var wqt='> Click away Player ' + csuff + ' ' + scoresuffix + '<';
wqt=' ' + csuff + ' ' + scoresuffix + '<';
var hjg='' + curplayer;
csuff='';
for (var ipl=0; ipl<hjg.length; ipl++) {
//alert(hjg.substring(ipl,eval(1 + eval('' + ipl))) + ' has ord ' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0) + ' to ' + eval(8304 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
csuff+=String.fromCodePoint(eval(8320 + eval(eval('' + hjg.substring(ipl,eval(1 + eval('' + ipl))).charCodeAt(0)) - 48)));
}
//defstyle=defstyle.replace(wqt,'> Click away Player ' + csuff + ' ' + scoresuffix + '<');
//defstyle=defstylereplace(wqt,' ' + csuff + ' ' + scoresuffix + '<');
defstyle=defstylereplace(' ' + qprevcsuff + '', ' ' + csuff);
console.log('kk');
document.head.innerHTML+=bpmore(defstyle);
if (eval('' + thishand.length) == eval('' + nominal_numplayers)) {
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
if (!in_bidding && !in_kitty) { donelistis+='' + curplayer + ','; }
setTimeout(dolaterx,2000); //alert('Player ' + curplayer + ' cards are ... ' + zsuffs[eval(-1 + curplayer)]);
}
whowon();
} else {
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
if (!in_bidding && !in_kitty) { donelistis+='' + curplayer + ','; }
//alert(312);
//alert('cuRPLAYer');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
} else if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert(912);
//alert('cuRPLAYER');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
}
}
} else {
//alert('6');
popupsim(eval(('' + opltlistt[iuh]).split('.')[1]), eval('' + oplistname[iuh]));
}
}
}
} else {
//alert('66');
popupsim(eval(('' + opltlistt[iuh]).split('.')[1]), eval(('' + opltlistl[iuh]).split('.')[1]));
}
}
}
}
}
}
}
function huh(opl) {
if (opl) {
if ((nominal_numplayers || document.URL.indexOf('onewindow=') != -1) || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
return null;
} else {
return opl;
}
} //if (card_game == '500ISH') {
//alert('here');
//}
return null;
}
function windowopen(one, two, three) {
//alert('one=' + one);
if (1 == 1 || (nominal_numplayers || document.URL.indexOf('onewindow=') != -1) || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
console.log('Here ' + oheight);
opltlistt.push(('' + eval(-42 + eval(three.split('top=')[1].split(',')[0].split(')')[0]))).split('.')[0] + '.' + kq);
if (eval('' + opltlistl.length) >= eval('' + opltlistt.length)) {
opltlistl[eval(-1 + eval('' + opltlistt.length))]='' + eval(three.split('left=')[1].split(',')[0].split(')')[0].split('.')[0] + opltlistl[eval(-1 + eval('' + opltlistt.length))]);
} else {
opltlistl.push((three.split('left=')[1].split(',')[0].split(')')[0].split('.')[0] + '.' + one.split('spcp=')[1].split('&')[0]));
}
oopltlistl.push((three.split('left=')[1].split(',')[0].split(')')[0].split('.')[0] + '.' + one.split('spcp=')[1].split('&')[0]));
oopltlistt.push(('' + eval(-42 + eval(three.split('top=')[1].split(',')[0].split(')')[0]))).split('.')[0] + '.' + kq);
owidth=eval(three.split('width=')[1].split(',')[0].split(')')[0].split('.')[0]);
//if (card_game.toLowerCase() == '500ish') { tfpx='' + owidth + 'px'; }
oheight=eval(three.split('height=')[1].split(',')[0].split(')')[0].split('.')[0]);
if (defstyle.indexOf('background: URL(') != -1) {
//defstyle=defstyle.split('background: URL(')[0] + 'background-repeat:repeat,no-repeat;background-size:contain,' + owidth + ' ' + oheight + ';background-position:0px 0px,' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px' + ';background-image: url(//www.rjmprogramming.com.au/rjmquiz_plus.jpg),url(' + cards[eval('' + donelist[eval(-1 + donelist.length)])] + ') ' + (' ' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px').substring(0,1) + '; } </style>'; // + ' ' + owidth + ' ' + oheight
defstyle=defstyle.split('background: URL(')[0] + 'background-repeat:no-repeat;background-size:' + owidth + 'px ' + oheight + 'px;background-position:' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px' + ';background-image: url(' + trumpgames(altcards[eval('' + donelist[eval(-1 + donelist.length)])],eval('' + donelist[eval(-1 + donelist.length)])) + ') ' + (' ' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px').substring(0,1) + '; } </style>'; // + ' ' + owidth + ' ' + oheight
//defstyle=defstyle.split('background: URL(')[0] + 'background-repeat:no-repeat;background-size:' + owidth + 'px ' + oheight + 'px;background-position:' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px' + ';background-image: url(' + altcards[eval('' + donelist[eval(-1 + donelist.length)])] + ') ' + (' ' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px').substring(0,1) + '; } </style>'; // + ' ' + owidth + ' ' + oheight
} else {
defstyle=defstyle.replace(';background-image:', (',' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px' + ';background-image:');
defstyle=defstyle.replace('no-repeat','no-repeat,no-repeat');
defstyle=defstyle.replace('background-size:' + owidth + 'px ' + oheight + 'px','background-size:' + owidth + 'px ' + oheight + 'px,' + owidth + 'px ' + oheight + 'px');
defstyle=defstyle.replace('; } </style>', ',url(' + trumpgames(altcards[eval('' + donelist[eval(0 + ijk)])],eval('' + donelist[eval(0 + ijk)])) + ') ' + (' ' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px').substring(0,1) + '; } </style>'); // + ' ' + owidth + ' ' + oheight
//defstyle=defstyle.replace('; } </style>', ',url(' + altcards[eval('' + donelist[eval(0 + ijk)])] + ') ' + (' ' + ('' + opltlistl[eval(-1 + opltlistl.length)]).split('.')[0] + 'px ' + ('' + opltlistt[eval(-1 + opltlistt.length)]).split('.')[0] + '' + 'px').substring(0,1) + '; } </style>'); // + ' ' + owidth + ' ' + oheight
}
//console.log('defstyle=' + defstyle);
//document.head.innerHTML+=defstyle;
if ((nominal_numplayers || document.URL.indexOf('onewindow=') != -1) || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
return null;
}
}
return window.open(one, two, three);
}
function bowerworry(inthree) {
if (card_game.toLowerCase() != 'bridge') {
if (trumpsare == 'c' && inthree == '11s') {
return '11C';
} else if (trumpsare == 'd' && inthree == '11h') {
return '11D';
} else if (trumpsare == 's' && inthree == '11c') {
return '11S';
} else if (trumpsare == 'h' && inthree == '11d') {
return '11H';
}
}
return inthree;
}
function trumpgames(defi, defkl) {
var gono=false;
var froms='>1.1<', tos='>1.1<';
var carddesc='', defval=0, ixc, blanks=' ';
var bdl=[];
var kjn=0;
var iskitty=false;
var a11='11';
var a12='12';
var a13='13';
var within=false;
var bcp='';
bgi++;
if (defi.indexOf('##') != -1) {
bcp=defi.split('##')[1];
defi=defi.split('##')[0];
}
if (1 == 1 && card_game.toLowerCase() == 'bridge') {
a11='junk';
//alert('bgi=' + bgi);
}
if (card_game.toLowerCase() == ulgame("500ish")) {
if (bcp != '') { oplistname[eval(-1 + eval('' + defkl))]=bcp; }
if (defi.indexOf('?n=') != -1 && defi.indexOf('back01.gif') != -1) { if (defi.indexOf('?n=') < defi.indexOf('back01.gif')) { gono=true; } }
if (defi.indexOf('images/0') != -1) {
carddesc='0' + defi.split('images/0')[1].substring(0,2);
if (carddesc.indexOf('01') == 0) {
defval=13;
} else if (carddesc == '000') {
//alert(defi + ' ' + defkl);
defval=24;
} else {
defval=eval(-1 + eval(carddesc.substring(1,2)));
}
} else if (defi.indexOf('images/1') != -1) {
carddesc='1' + defi.split('images/1')[1].substring(0,2);
if (carddesc.indexOf('11') == 0 && card_game.toLowerCase() != 'bridge') {
defval=eval(-1 * eval(-1 + eval(carddesc.substring(0,2))));
} else {
defval=eval(-1 + eval(carddesc.substring(0,2)));
}
}
if (bgi == 52 && !gono && card_game.toLowerCase() == 'bridge') { tcp=2; iskitty=true; hands.push('' + defkl + blanks.substring(0,Math.abs(defval)) + carddesc); }
if (gono) {
//alert('hUh');
return defi;
} else {
tcp++;
if (eval('' + tcp) > eval('' + nominal_numplayers)) {
tcp=1;
tcpnum++;
if (card_game == ulgame("500ISH") && ('' + tcpnum).replace('12','11').replace('13','11') == a11 && 1 == 1) {
//totcpp=40;
//alert('wHy');
hands.push('' + defkl + blanks.substring(0,Math.abs(defval)) + carddesc);
if (card_game.toLowerCase() != 'bridge') { iskitty=true; } // tos='>Kitty' + ' ?n=' + defi.split('?n=')[1].split('#')[0].split('<')[0] + '<';
} //else {
tos='>' + tcp + '.' + tcpnum + ' ?n=' + defi.split('?n=')[1].split('#')[0].split('<')[0] + '<';
//}
} else {
if (card_game == ulgame("500ISH") && ('' + tcpnum).replace('12','11').replace('13','11') == a11 && 1 == 1) {
//totcpp=40;
//alert('wHY');
hands.push('' + defkl + blanks.substring(0,Math.abs(defval)) + carddesc);
if (card_game.toLowerCase() != 'bridge') { iskitty=true; } // tos='>Kitty' + ' ?n=' + defi.split('?n=')[1].split('#')[0].split('<')[0] + '<';
} //else {
tos='>' + tcp + '.' + tcpnum + ' ?n=' + defi.split('?n=')[1].split('#')[0].split('<')[0] + '<';
//}
}
if (eval('' + hands.length) < eval('' + totcpp) && !iskitty) { // && !iskitty
//if (bgi == 52) { alert('HUh'); }
within=true;
if (card_game.toLowerCase() == 'bridge') { within=false; }
//if (carddesc == '000' || 1 == 11) { alert(('' + defkl + blanks.substring(0,Math.abs(defval)) + carddesc).replace(/\ /g,'x')); }
hands.push('' + defkl + blanks.substring(0,Math.abs(defval)) + carddesc);
} else if ((tcp == 1 && !iskitty && eval('' + hands.length) >= eval('' + totcpp)) || (tcp == 3 && iskitty)) {
//if (!within && ((tcp == 1 && !iskitty && eval('' + hands.length) >= eval('' + totcpp)) || (tcp == 3 && iskitty))) {
//alert('HUH');
var oneidea=defi.split('?')[0];
var twoidea=defi.split('#')[1];
if (oneidea.indexOf('back01.') == -1) {
if (trumpsare == '') {
if (defi.indexOf('images/0') != -1) {
trumpsare=defi.split('images/0')[1].substring(1,2); // joker results in 0 as trumps
} else if (defi.indexOf('images/1') != -1) {
trumpsare=defi.split('images/1')[1].substring(1,2);
}
//if (iskitty && curplayer == 1) { alert('Trumps are ' + trumpsare + ' ... ' + curplayer); }
}
// trumpsare='h'; // kludge 3
//alert('0:' + defi);
return defi;
} else {
if (trumpsare == '') {
if (twoidea.indexOf('images/0') != -1) {
trumpsare=twoidea.split('images/0')[1].substring(1,2); // joker results in 0 as trumps
} else if (twoidea.indexOf('images/1') != -1) {
trumpsare=twoidea.split('images/1')[1].substring(1,2);
}
//if (iskitty && curplayer == 1) { alert('TrumPs are ' + trumpsare + ' ... ' + curplayer); }
}
// trumpsare='h'; // kludge 3
origt=trumpsare;
orighands=hands;
for (ixc=0; ixc<hands.length; ixc++) {
bdl=hands[ixc].split(' ');
if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('000') == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,17);
//alert(hands[ixc].replace(' ',blanks.substring(0,20)).replace(/\ /g,'x'));
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,33));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 33'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('11' + trumpsare) == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,17);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,31));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 31'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].indexOf('11' + trumpsare.replace('c','S').replace('s','C').replace('d','H').replace('h','D').toLowerCase()) == 0) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,16);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,30));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 30'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else if (bdl[eval(-1 + eval('' + bdl.length))].slice(-1) == trumpsare) {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'') + blanks.substring(0,13);
hands[ixc]=hands[ixc].replace(' ',blanks.substring(0,27));
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 27'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=aStringfromCodePoint(kjn, eval(-1 + eval(eval(ixc % nominal_numplayers) + 1)), ' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]));
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
} else {
//hands[ixc]=hands[ixc].replace(bdl[eval(-1 + eval('' + bdl.length))],'');
hands[ixc]=hands[ixc];
// if (ixc == 0) { alert('hands[ixc]=' + hands[ixc] + ' trumpsare=' + trumpsare + ' 0'); }
if (eval(eval(ixc % nominal_numplayers) + 1) == curplayer || 1 == 1) {
for (kjn=0; kjn<spcps.length; kjn++) {
if (spcps[kjn].indexOf(bdl[eval(-1 + eval('' + bdl.length))]) != -1) {
zsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0]));
ysuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + String.fromCodePoint(eval(spcps[kjn].split('/')[0])) + ',' + bowerworry(spcps[kjn].slice(-7).split('.')[0]);
wsuffs[eval(-1 + eval(eval(ixc % nominal_numplayers) + 1))]+=' ' + eval(eval(ixc % nominal_numplayers) + 1) + '.' + Math.floor(eval(ixc + eval('' + nominal_numplayers)) / eval('' + nominal_numplayers)) + ':' + bStringfromCodePoint(eval(spcps[kjn].split('/')[0]));
}
}
}
}
}
zsuff=zsuffs[eval(-1 + curplayer)];
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
if (!in_bidding && !in_kitty) { donelistis+='' + curplayer + ','; }
//alert(417);
//alert('CuRplaYEr');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
} else if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert(817);
//alert('cURplaYEr');
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)]));
}
//alert('1:' + twoidea + '?n=' + defi.split('?n=')[1].split('#')[0].split('<')[0] + '#' + oneidea);
if (!iskitty) { return twoidea + '?n=' + defi.split('?n=')[1].split('#')[0].split('<')[0] + '#' + oneidea; }
}
} else {
tos='><';
}
}
//alert('2:' + '' + dhicp.split('url(')[1].split(') ')[0].replace(froms,tos) + '');
if (bcp != '') { return '' + dhicp.split('url(')[1].split(') ')[0].replace(froms,tos).replace('<text','<!-- ' + bcp + ' ' + carddesc + ' --><text'); }
return '' + dhicp.split('url(')[1].split(') ')[0].replace(froms,tos) + '';
}
return defi;
}
function wosf(st) {
cw=st;
}
function ourprompt(tw, blb, bdef) {
var kijk;
console.log('oplist[' + eval('' + tw) + '].document.name=' + oplist[eval('' + tw)].document.name + ' and dragorder[' + curdrag + ']=' + dragorder[eval('' + curdrag)] + ' vs tw=' + tw + ' and overall;goes=' + overallgoes);
if (oplist[eval('' + tw)].document.name == ('' + dragorder[eval('' + curdrag)]) && eval('' + curdrag) == eval('' + overallgoes)) {
console.log('Dragorder[' + curdrag + ']=' + dragorder[eval('' + curdrag)] + ' vs tw=' + tw + ' and overall;goes=' + overallgoes);
var decs=documenttitle.split('.');
curdrag++;
overallgoes++;
if (eval('' + decs.length) >= 3) {
documenttitleeq(documenttitle.replace('.' + decs[1] + '.', '.' + curdrag + '/' + overallgoes + '.'));
}
oplist[eval('' + tw)].close();
if (!nominal_numplayers) {
defstyle=defstyle.replace(cards[donelist[eval('' + tw)]].split('#')[0].split('gif')[0], cards[donelist[eval('' + tw)]].split('#')[0].split('gif')[0] + 'JUNK');
console.log('ll');
document.head.innerHTML+=bpmore(defstyle);
}
return null;
}
if (eval('' + oplist[eval('' + tw)].screenTop) == eval('' + opltlistt[eval('' + tw)]) && eval('' + oplist[eval('' + tw)].screenLeft) == eval('' + opltlistl[eval('' + tw)])) {
if (spcps[eval('' + tw)].indexOf('#') != -1) {
spcps[eval('' + tw)]=spcps[eval('' + tw)].replace(/\#/g,'');
if (xwogf(tw).indexOf(' dragged to ') != -1) {
console.log('FALSE');
return null; //false;
} else {
console.log('TRUE');
cw=eval('' + tw);
for (kijk=0; kijk<spcps.length; kijk++) {
spcps[eval('' + kijk)]=spcps[eval('' + kijk)].replace(/\#/g,'');
}
return true; //prompt(blb, bdef); //true;
}
} else {
spcps[eval('' + tw)]+='#';
}
} else {
opltlistt[eval('' + tw)]=eval('' + oplist[eval('' + tw)].screenTop);
opltlistl[eval('' + tw)]=eval('' + oplist[eval('' + tw)].screenLeft);
//spcps[eval('' + tw)]=spcps[eval('' + tw)].replace(/\#/g,'');
spcps[eval('' + tw)]+='#';
return null; //false;
console.log('False');
}
console.log('false');
spcps[eval('' + tw)]+='#';
if (nullv) {
nullv=null;
cw=eval('' + tw);
for (kijk=0; kijk<spcps.length; kijk++) {
spcps[eval('' + kijk)]=spcps[eval('' + kijk)].replace(/\#/g,'');
}
return true; //prompt(blb, bdef); //true;
}
cw=eval('' + tw);
for (kijk=0; kijk<spcps.length; kijk++) {
spcps[eval('' + kijk)]=spcps[eval('' + kijk)].replace(/\#/g,'');
}
return true; //prompt(blb, bdef); //nullv; //false;
}
function wond(tw) {
return true;
//cw=eval('' + tw);
console.log('tw=' + tw);
if (eval('' + oplist[eval('' + tw)].screenTop) == eval('' + opltlistt[eval('' + tw)]) && eval('' + oplist[eval('' + tw)].screenLeft) == eval('' + opltlistl[eval('' + tw)])) {
if (spcps[eval('' + tw)].indexOf('##') != -1) {
spcps[eval('' + tw)]=spcps[eval('' + tw)].replace('##','');
if (xwogf(tw).indexOf(' dragged to ') != -1) {
console.log('FALSE');
return false;
} else {
console.log('TRUE');
return true;
}
} else {
spcps[eval('' + tw)]+='#';
}
} else {
opltlistt[eval('' + tw)]=eval('' + oplist[eval('' + tw)].screenTop);
opltlistl[eval('' + tw)]=eval('' + oplist[eval('' + tw)].screenLeft);
spcps[eval('' + tw)]=spcps[eval('' + tw)].replace(/\#/g,'');
console.log('False');
}
console.log('false');
spcps[eval('' + tw)]+='#';
return false;
}
function xwogf(xcw) {
var sx='', nearest=-1;
var minl=-1, mint=-1;
if (eval('' + xcw) >= 0) {
if (!oplist[eval('' + xcw)].closed) {
sx=' (' + oplist[eval('' + xcw)].screenLeft + ',' + oplist[eval('' + xcw)].screenTop + ')';
for (var kijk=0; kijk<spcps.length; kijk++) {
if (!oplist[kijk].closed) {
if (eval('' + kijk) != eval('' + xcw)) {
if (minl < 0) {
mint=Math.abs(eval(oplist[eval('' + xcw)].screenTop - opltlistt[kijk]));
minl=Math.abs(eval(oplist[eval('' + xcw)].screenLeft - opltlistl[kijk]));
sx+=' [' + opltlistt[kijk] + ';' + opltlistl[kijk] + '] ';
nearest=kijk;
} else if (eval(eval('' + mint) + eval('' + minl)) > eval(Math.abs(eval(oplist[eval('' + xcw)].screenTop - opltlistt[kijk])) + Math.abs(eval(oplist[eval('' + xcw)].screenLeft - opltlistl[kijk]))) ) {
nearest=kijk;
mint=Math.abs(eval(oplist[eval('' + xcw)].screenTop - opltlistt[kijk]));
minl=Math.abs(eval(oplist[eval('' + xcw)].screenLeft - opltlistl[kijk]));
}
}
}
}
if (lastdrag.indexOf(',' + xcw + ',' + nearest + ',') == -1 && eval('' + nearest) != eval('' + xcw) && Math.abs(eval('' + minl) + eval('' + mint)) < 10 && eval('' + nearest) != -1) {
sx+=' ... dragged to ' + nearest;
lastdrag=',' + xcw + ',' + nearest + ',' + xcw + ',';
//oplist[eval('' + nearest)].focus();
//oplist[eval('' + cw)].blur();
oplist[eval('' + xcw)].close();
if (!nominal_numplayers) {
defstyle=defstyle.replace(cards[donelist[eval('' + xcw)]].split('#')[0].split('gif')[0], cards[donelist[eval('' + xcw)]].split('#')[0].split('gif')[0] + 'JUNK');
console.log('mm');
document.head.innerHTML+=bpmore(defstyle);
}
}
console.log(xcw + sx);
}
}
return '' + xcw + sx;
}
function closeit(ikl) {
if (!nominal_numplayers) {
defstyle=defstyle.replace(cards[eval('' + ikl)].split('#')[0].split('gif')[0], cards[eval('' + ikl)].split('#')[0].split('gif')[0] + 'JUNK');
console.log('nn');
document.head.innerHTML+=bpmore(defstyle);
}
}
function wogf() {
var sx='', nearest=-1;
var minl=-1, mint=-1;
if (eval('' + cw) >= 0) {
if (!oplist[eval('' + cw)].closed) {
sx=' (' + oplist[eval('' + cw)].screenLeft + ',' + oplist[eval('' + cw)].screenTop + ')';
for (var kijk=0; kijk<spcps.length; kijk++) {
if (!oplist[kijk].closed) {
if (eval('' + kijk) != eval('' + cw)) {
if (minl < 0) {
mint=Math.abs(eval(oplist[eval('' + cw)].screenTop - opltlistt[kijk]));
minl=Math.abs(eval(oplist[eval('' + cw)].screenLeft - opltlistl[kijk]));
sx+=' [' + opltlistt[kijk] + ';' + opltlistl[kijk] + '] ';
nearest=kijk;
} else if (eval(eval('' + mint) + eval('' + minl)) > eval(Math.abs(eval(oplist[eval('' + cw)].screenTop - opltlistt[kijk])) + Math.abs(eval(oplist[eval('' + cw)].screenLeft - opltlistl[kijk]))) ) {
nearest=kijk;
mint=Math.abs(eval(oplist[eval('' + cw)].screenTop - opltlistt[kijk]));
minl=Math.abs(eval(oplist[eval('' + cw)].screenLeft - opltlistl[kijk]));
}
}
}
}
if (lastdrag.indexOf(',' + cw + ',' + nearest + ',') == -1 && eval('' + nearest) != eval('' + cw) && Math.abs(eval('' + minl) + eval('' + mint)) < 10 && eval('' + nearest) != -1) {
sx+=' ... dragged to ' + nearest;
lastdrag=',' + cw + ',' + nearest + ',' + cw + ',';
//oplist[eval('' + nearest)].focus();
//oplist[eval('' + cw)].blur();
oplist[eval('' + cw)].close();
if (!nominal_numplayers) {
defstyle=defstyle.replace(cards[donelist[eval('' + cw)]].split('#')[0].split('gif')[0], cards[donelist[eval('' + cw)]].split('#')[0].split('gif')[0] + 'JUNK');
console.log('oo');
document.head.innerHTML+=bpmore(defstyle);
}
}
console.log(cw + sx);
}
}
return '' + cw + sx;
}
function reputwas() {
documenttitleeq(wastitle);
}
function reassess() {
var retv='', ewq;
var retcols=[];
var ir=0;
if (window.localStorage) {
try {
retv=('' + window.localStorage.getItem('cards_usefocus_local')).replace(/^null$/g,'');
console.log('localStorage=' + retv);
if (retv != '' && retv != retv.replace(/^undefined/g,'')) {
window.localStorage.removeItem('cards_usefocus_local');
} else if (retv != '' && retv == retv.replace(/^undefined/g,'')) {
//alert('0:' + retv);
retcols=decodeURIComponent(retv).split('~');
sq=[];
asq=[];
for (ir=0; ir<retcols.length; ir++) {
sq.push(retcols[ir].split('?!')[0] + '?');
asq.push(retcols[ir].split('?!')[1]);
nomap=false;
given='';
}
return;
}
} catch(ewq) {
}
}
if (window.sessionStorage) {
try {
retv=('' + window.sessionStorage.getItem('cards_usefocus_session')).replace(/^null$/g,'');
console.log('sessionStorage=' + retv);
if (retv != '' && retv != retv.replace(/^undefined/g,'')) {
window.sessionStorage.removeItem('cards_usefocus_session');
} else if (retv != '' && retv == retv.replace(/^undefined/g,'')) {
//alert('1:' + retv);
retcols=decodeURIComponent(retv).split('~');
sq=[];
asq=[];
for (ir=0; ir<retcols.length; ir++) {
sq.push(retcols[ir].split('?')[0] + '?');
asq.push(retcols[ir].split('?')[1]);
nomap=false;
given='';
}
return;
}
} catch(ewq) {
}
}
}
function assess(what) {
var ewq, retv='';
if (what.toLowerCase().indexOf('memor') == 0) {
location.href=document.URL.split('?')[0].split('#')[0] + '?card_memories=y';
}
if (what.toLowerCase() == '?x') {
sslistq=[];
sslista=[];
if (window.sessionStorage) {
try {
window.sessionStorage.removeItem('cards_usefocus_session');
} catch(ewq) {
}
location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);
return '';
}
return '';
} else if (what.toLowerCase() == '?!x') {
lslistq=[];
lslista=[];
if (window.localStorage) {
try {
window.localStorage.removeItem('cards_usefocus_local');
} catch(ewq) {
}
location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);
return '';
}
return '';
} else if (what.toLowerCase().indexOf('?!') != -1) {
if (what.toLowerCase() == '?!') {
location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);
return '';
}
if (window.localStorage) {
if (lslistq.length == 0) {
lslistq.push(what.split('?!')[0]);
lslista.push(what.split('?!')[1]);
window.localStorage.setItem('cards_usefocus_local', encodeURIComponent(what));
} else {
lslistq.push(what.split('?!')[0]);
lslista.push(what.split('?!')[1]);
window.localStorage.setItem('cards_usefocus_local', window.localStorage.getItem('cards_usefocus_local') + encodeURIComponent('~' + what));
}
}
return '';
} else if (what.toLowerCase().indexOf('?') != -1) {
if (what.toLowerCase() == '?') {
location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897);
return '';
}
if (window.sessionStorage) {
if (sslistq.length == 0) {
sslistq.push(what.split('?')[0]);
sslista.push(what.split('?')[1]);
window.sessionStorage.setItem('cards_usefocus_session', encodeURIComponent(what));
} else {
sslistq.push(what.split('?')[0]);
sslista.push(what.split('?')[1]);
window.sessionStorage.setItem('cards_usefocus_session', window.sessionStorage.getItem('cards_usefocus_session') + encodeURIComponent('~' + what));
}
}
return '';
} else {
firstbit='';
if (window.localStorage) {
try {
retv=('' + window.localStorage.getItem('cards_usefocus_local')).replace(/^null$/g,'');
if (retv != '' && nomap) { location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897); }
} catch(ewq) {
}
}
if (window.sessionStorage) {
try {
retv=('' + window.sessionStorage.getItem('cards_usefocus_session')).replace(/^null$/g,'');
if (retv != '' && nomap) { location.href=document.URL.split('#')[0].split('?')[0] + '?rand=' + Math.floor(Math.random() * 198765897); }
} catch(ewq) {
}
}
}
return what;
}
function blurb() {
if (wblurb == ' Hello Player 1' && theblurb == ' If you are player 2 rather than player 1 append space to your answer.') {
theblurb='';
wblurb='';
}
var twf=theblurb + wblurb + firstbit;
return twf;
}
function getnum() {
return numplayers;
}
function examinescore() {
var zs='';
var dolater=false;
var incscore=0; incgoes=1;
var dts=[];
if (documenttitle.indexOf('/') == -1) {
documenttitleeq(wastitle);
dts=wastitle.split('/');
} else {
dts=documenttitle.split('/');
}
if ((force || documenttitle.indexOf(':') == -1) && dts.length != 1) {
if (force) { force=false; }
dts[1]=dts[1].split(' ')[0].split('.')[0];
dts[0]=dts[0].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++;
//alert('new player');
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];
}
documenttitleeq('' + overallscore + '.' + psecs + '/' + overallgoes + '.' + secs + ' ' + infill + ' is User Score/Goes - RJM Programming - April, 2021 ' + stcprefix);
wastitle=documenttitle;
} else {
documenttitleeq('' + overallscore + '.' + psecs + '/' + overallgoes + '.' + secs + ' is User: Score/Goes - RJM Programming - April, 2021 ' + stcprefix);
wastitle=documenttitle;
}
}
}
function dothis(inthing) {
stcprefix=String.fromCodePoint(eval('' + defstcp));
documenttitleeq(String.fromCodePoint(eval('' + defstcp))); //'🂾';
console.log('pp');
document.head.innerHTML+=bpmore(defstyle); //"<style> html { background-color: yellow; font-size: 36px; background: URL('//www.rjmprogramming.com.au/rjmquiz_plus.jpg'); background-size: contain; } </style>";
for (ij=0; ij<spcps.length; ij++) {
if (spcps[ij].indexOf('' + eval(location.search.split('spcp=')[1] ? location.search.split('spcp=')[1].split('&')[0] : defstcp)) == 0) {
ji=ij;
}
}
if (ji >= 0) {
fi=document.createElement('link');
fi.rel='icon';
fi.href=cards[ji];
document.head.appendChild(fi);
}
}
function blater() {
//newalert('yes');
if (1 == 2 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
window.addEventListener('touchstart', function(evt) {
evt.preventDefault();
var touches = evt.changedTouches;
//if (evt.touches) {
if (touches[0].pageX) {
iourx = touches[0].pageX;
ioury = touches[0].pageY;
} else if (touches[0].clientX) {
iourx = touches[0].clientX;
ioury = touches[0].clientY;
}
//alert('x:' + iourx);
//}
clickedmaybe();
}, false);
} else {
eles = document.querySelectorAll("*")
for (var ele of eles) {
//console.log('yes well');
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
ele.addEventListener('touchstart', function(evt) {
evt.preventDefault();
var touches = evt.changedTouches;
//if (evt.touches) {
if (touches[0].pageX) {
iourx = touches[0].pageX;
ioury = touches[0].pageY;
} else if (touches[0].clientX) {
iourx = touches[0].clientX;
ioury = touches[0].clientY;
}
//alert('x:' + iourx);
//}
clickedmaybe();
}, false);
ele.addEventListener('touchmove', function(evt) {
evt.preventDefault();
var touches = evt.changedTouches;
//if (evt.touches) {
if (touches[0].pageX) {
iourx = touches[0].pageX;
ioury = touches[0].pageY;
} else if (touches[0].clientX) {
iourx = touches[0].clientX;
ioury = touches[0].clientY;
}
//alert('x:' + iourx);
//}
clickedmaybe();
}, false);
ele.addEventListener('click', function(evt) {
evt.preventDefault();
var touches = evt.changedTouches;
//if (evt.touches) {
if (touches[0].pageX) {
iourx = touches[0].pageX;
ioury = touches[0].pageY;
} else if (touches[0].clientX) {
iourx = touches[0].clientX;
ioury = touches[0].clientY;
}
//alert('x:' + iourx);
//}
ocp=evt.target;
if (('' + iourx + ',' + ioury) == lastec && lastec != '' && notyet) {
location.href=document.URL.split('?')[0].split('#')[0] + '?card_memories=y';
} else if (lastec == '') {
setTimeout(antilastec, 2000);
setTimeout(antinotyet, 200);
notyet=false;
lastec='' + iourx + ',' + ioury;
} else {
setTimeout(antilastec, 2000);
setTimeout(antinotyet, 200);
notyet=false;
lastec='' + iourx + ',' + ioury;
}
clickedmaybe();
}, false);
} else {
ele.addEventListener('click', function(evt) {
if (evt.touches) {
if (evt.touches[0].pageX) {
iourx = evt.touches[0].pageX;
ioury = evt.touches[0].pageY;
} else {
iourx = evt.touches[0].clientX;
ioury = evt.touches[0].clientY;
}
//alert('' + iourx);
} else if (evt.clientX) {
iourx = evt.clientX; // - elemLeft;
ioury = evt.clientY; // - elemLeft;
} else if (!evt.touches) {
iourx = evt.pageX; // - elemLeft;
ioury = evt.pageX; // - elemLeft;
}
ocp=evt.target;
if (('' + iourx + ',' + ioury) == lastec && lastec != '' && notyet) {
location.href=document.URL.split('?')[0].split('#')[0] + '?card_memories=y';
} else if (lastec == '') {
setTimeout(antilastec, 2000);
setTimeout(antinotyet, 200);
notyet=false;
lastec='' + iourx + ',' + ioury;
} else {
setTimeout(antilastec, 2000);
setTimeout(antinotyet, 200);
notyet=false;
lastec='' + iourx + ',' + ioury;
}
clickedmaybe();
//alert('here');
});
ele.addEventListener('dblclick', function(evt) {
location.href=document.URL.split('?')[0].split('#')[0] + '?card_memories=y';
});
}
}
}
}
function secsu() {
var ewd;
if (eval('' + secs) == 0) {
if ((nominal_numplayers || document.URL.indexOf('onewindow=') != -1) || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
flexible=false;
} else {
flexible=true;
//console.log('Flexible=T');
}
setTimeout(blater, 2500);
}
if (eval('' + overallgoes) < fiftytwo && eval('' + fiftytwo) > 0) {
secs++;
} else if (documenttitle.indexOf('Congratulations') == -1) {
documenttitle+=' ... Congratulations! End of Game! Refresh webpage to try again.';
if (card_game == ulgame('500ISH')) {
sfhz(true);
}
}
//if (sentanswer != '') {
// sentclick(); //alert('click ' + sentanswer + ' square');
// sentanswer='';
//}
var decs=documenttitle.split('.');
if (eval('' + decs.length) >= 3) {
documenttitleeq(documenttitle.replace('.' + decs[2].split(' ')[0] + ' ', '.' + secs + ' '));
} else {
ps=documenttitle.split('/')[0].trim();
pg=documenttitle.split('/')[1].split(' ')[0];
if (ps.indexOf('.') == -1 || pg.indexOf('.') == -1) {
ps=eval('' + overallscore + '.' + psecs); //eval(documenttitle.split('/')[0].trim());
pg=eval('' + overallgoes + '.' + secs);
documenttitleeq(documenttitle.replace(documenttitle.split(' ')[0], '' + overallscore + '.' + psecs + '/' + '' + overallgoes + '.' + secs));
//console.log('documenttitle becomes ' + documenttitle);
} else {
ps=eval(ps);
pg=eval(pg);
}
}
if (flexible) {
if (document.hasFocus()) {
flexible=false;
//console.log('Flexible=F');
lastzkq='';
lastzkl='';
owidth=oowidth;
oheight=ooheight;
for (var igh=0; igh<oplist.length; igh++) {
opltlistl[igh]=oopltlistl[igh];
opltlistt[igh]=oopltlistt[igh];
if (oplist[igh]) {
//console.log('Flexible=F' + igh);
if (!oplist[igh].closed) {
try {
oplist[igh].close();
oplist[igh]=null;
} catch(ewd) {
}
} else {
oplist[igh]=null;
}
}
}
}
}
setTimeout(secsu,1000);
}
function ozt(inz) {
var sch=inz.split(' ' + curplayer + '.1:');
if (eval('' + sch.length) >= 3) {
inz=sch[0] + ' ' + curplayer + '.1:' + sch[1] + ' ';
}
if (1 == 9 && (!in_bidding || in_kitty) && eval('' + omc) >= 0 && (sef(emailsms[eval(-1 + curplayer)], eval(-1 + curplayer)).toLowerCase() != sef(emailsms[eval(-1 + curplayer)], eval(-1 + curplayer)) || sef(emailsms[eval(-1 + curplayer)], eval(-1 + curplayer)).indexOf('@') == -1)) {
if (eval('' + omc) == eval('' + curplayer)) {
return inz + ' and the open hand played by your partner ', sef(emailsms[eval(-1 + curplayer)], eval(-1 + curplayer)); // + ' is ' + zsuffs[eval(-1 + omc)].split('' + omc + '.11')[0];
} else {
return inz + ' and the open hand is ', zsuffs[eval(-1 + omc)].split('' + omc + doteleven)[0];
}
}
return inz;
}
function listenout() {
secs++;
documenttitleeq('Listening for ' + secs + ' seconds ...');
if (gd != '' && ma != '') {
form = new FormData();
xhr = new XMLHttpRequest();
form.append('gamedate', gd);
var swap1=location.search.split('swap1=')[1] ? decodeURIComponent(location.search.split('swap1=')[1].split('&')[0]) : ' ';
var swap2=location.search.split('swap2=')[1] ? decodeURIComponent(location.search.split('swap2=')[1].split('&')[0]) : ' ';
var swap3=location.search.split('swap3=')[1] ? decodeURIComponent(location.search.split('swap3=')[1].split('&')[0]) : ' ';
if (swap1 != ' ' || swap2 != ' ' || swap3 != ' ') {
//alert(ma + '|' + swap1.trim() + '|' + swap2.trim() + '|' + swap3.trim());
form.append('myanswer', ma + '|' + swap1.trim() + '|' + swap2.trim() + '|' + swap3.trim());
} else {
form.append('myanswer', ma);
}
if (mn != ('Player ' + curplayer)) {
form.append('myname', mn);
}
//alert('sending ma=' + ma + '!');
xhr.open('post', document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php'), true);
xhr.send(form);
} else {
if (!doesFileExist(listenforwhat)) {
setTimeout(listenout, 5000);
}
}
}
if (gd != '' && ma.trim() != '') {
if (1 == 1 || (eval('' + ma.length) >= 3 && eval('' + ma.length) <= 4)) {
setTimeout(listenout,1000);
} else if (in_bidding || in_kitty) {
if (ma.toLowerCase().replace('redo','pass').replace('doub','pass').indexOf('pass') == 0) {
if (ma.toLowerCase().indexOf('pass') == 0) {
passcnt++;
passcnt+=xpass;
xpass=0;
} else if (ma.toLowerCase().indexOf('redo') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 2) { doublefactor=4; rsdn=" style='display:none;'"; dsdn=" style='display:none;'"; }
} else if (ma.toLowerCase().indexOf('doub') == 0) {
if (card_game.toUpperCase() == 'BRIDGE' && doublefactor == 1) { doublefactor=2; dsdn=" style='display:none;'"; rsdn=""; }
}
console.log('PASSCNT=' + passcnt + ' and ma=' + ma + ' and gd=' + gd);
//ma=' ';
//gd='';
if (passcnt == 4 || passcnt == 3) {
if (passcnt == 4) { in_bidding=false; }
curplayer=eval('' + cbidby);
lastwinner=eval('' + cbidby);
} else {
bidplayer++;
if (eval('' + bidplayer) == eval('' + nominal_numplayer)) { bidplayer=1; }
}
} else { // if (ma != ' ') {
doublefactor=1;
if (card_game.toLowerCase() == 'bridge') { rsdn=" style='display:none;'"; dsdn=""; }
passcnt=0;
var thisbidrank=-1;
for (var ibidis=0; ibidis<bids.length; ibidis++) {
if (ma.substring(0,3).toLowerCase() == (bids[ibidis] + ' ').substring(0,3).toLowerCase()) {
thisbidrank=ibidis;
if (eval('' + thisbidrank) > eval('' + cbidrank)) {
var xprevcb=' ' + cbid + ' ';
cbid=bids[ibidis];
dsdn='';
cbidby=eval(0 + eval('' + bidplayer));
if (cbid.toLowerCase().indexOf('ope') == 0 || card_game.toLowerCase() == 'bridge') {
omh=eval('' + cbidby);
omc=eval(-2 + eval('' + cbidby));
if (omc < 1) { omc+=4; }
} else {
omh=-1;
omc=-1;
}
for (var jcx=1; jcx<=eval('' + nominal_numplayers); jcx++) {
if (jcx != cbidby) {
hsuffs[eval(-1 + jcx)]='';
}
}
//sss=' leading ' + cbidby + ' bid ' + cbid + ' ' + emojisuit();
//alert('Found relevant bid ' + bids[ibidis] + ' and Ma=' + ma + ' and Cbidby=' + cbidby);
var kjsbit=' ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' ';
for (var mjihgs=0; mjihgs<ssuffs.length; mjihgs++) {
if (ssuffs[mjihgs].indexOf('Bidding proceeds ') != -1) {
ssuffs[mjihgs]='Bidding proceeds after last ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass') + ' leading bid. ';
msuffs[mjihgs]=msuffs[mjihgs].replace(prevcb, ' ' + cbid + ' ').replace(xprevcb, ' ' + cbid + ' ');
ssuffs[mjihgs]=ssuffs[mjihgs].replace(prevcb, ' ' + cbid + ' ').replace(xprevcb, ' ' + cbid + ' ');
}
}
cbidrank=ibidis;
bidplayer++;
if (eval('' + bidplayer) == eval('' + nominal_numplayer)) { bidplayer=1; }
curplayer=eval('' + bidplayer);
}
// send next
var remote=false;
if (eval('' + emailsms.length) >= eval('' + curplayer)) {
if (('' + emailsms[eval('' + curplayer)]).trim() != '') {
remote=true;
if (donelistis.indexOf(',' + curplayer + ',') == -1) {
//alert('CURplaYeR ' + curplayer);
myalertmc(efs('Player ' + curplayer,curplayer) + ' cards are ... ' + ozt(zsuffs[eval(-1 + curplayer)])); // new
} else {
alert('STraight');
retcom(msuffs[eval(-1 + bidplayer)], rsuffs[eval(-1 + bidplayer)]);
}
}
}
//alert('CURPLAYER');
if (!remote) { ma=prompt(efs('Player ' + bidplayer + ', what is your bid out of pass or [6-10][sdhcn] or mis ?',bidplayer),''); if (ma == null) { ma="pass "; } else if (ma.toLowerCase().indexOf('mis') == 0) { ma='misere'; } else if (ma.toLowerCase().indexOf('open') == 0) { ma='open'; } location.href=document.URL.split('?')[0].split('#')[0].replace('.html','.php').replace('.htm','.php') + '?gamedate=' + encodeURIComponent(gd) + '&myanswer=' + encodeURIComponent(ma); }
}
}
}
}
} else if (1 == 11) {
setInterval(secsu,1000);
}
</script>
</head>
</html>