<!doctype html>
<html>
<head>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<title>The BuzzIn Word Guessing Game for Three - One on Mouse and One at Keyboard and One at Right Mouse - RJM Programming - September, 2015</title>
<style>
td { text-align: center; }
table { border: 5px teal solid; }
h1.aa:after {
content: 'a';
}
h1.ab:after {
content: 'b';
}
h1.ac:after {
content: 'c';
}
h1.ad:after {
content: 'd';
}
h1.ae:after {
content: 'e';
}
h1.af:after {
content: 'f';
}
h1.ag:after {
content: 'g';
}
h1.ah:after {
content: 'h';
}
h1.ai:after {
content: 'i';
}
h1.aj:after {
content: 'j';
}
h1.ak:after {
content: 'k';
}
h1.al:after {
content: 'l';
}
h1.am:after {
content: 'm';
}
h1.an:after {
content: 'n';
}
h1.ao:after {
content: 'o';
}
h1.ap:after {
content: 'p';
}
h1.aq:after {
content: 'q';
}
h1.ar:after {
content: 'r';
}
h1.as:after {
content: 's';
}
h1.at:after {
content: 't';
}
h1.au:after {
content: 'u';
}
h1.av:after {
content: 'v';
}
h1.aw:after {
content: 'w';
}
h1.ax:after {
content: 'x';
}
h1.ay:after {
content: 'y';
}
h1.az:after {
content: 'z';
}
span.aa:after {
content: 'a';
}
span.ab:after {
content: 'b';
}
span.ac:after {
content: 'c';
}
span.ad:after {
content: 'd';
}
span.ae:after {
content: 'e';
}
span.af:after {
content: 'f';
}
span.ag:after {
content: 'g';
}
span.ah:after {
content: 'h';
}
span.ai:after {
content: 'i';
}
span.aj:after {
content: 'j';
}
span.ak:after {
content: 'k';
}
span.al:after {
content: 'l';
}
span.am:after {
content: 'm';
}
span.an:after {
content: 'n';
}
span.ao:after {
content: 'o';
}
span.ap:after {
content: 'p';
}
span.aq:after {
content: 'q';
}
span.ar:after {
content: 'r';
}
span.as:after {
content: 's';
}
span.at:after {
content: 't';
}
span.au:after {
content: 'u';
}
span.av:after {
content: 'v';
}
span.aw:after {
content: 'w';
}
span.ax:after {
content: 'x';
}
span.ay:after {
content: 'y';
}
span.az:after {
content: 'z';
}
.cell {
background-color: lightblue;
display: inline;
}
</style>
<script src="http://api.jquery.com/jquery-wp-content/themes/jquery/js/modernizr.custom.2.6.2.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write(unescape('%3Cscript src="//api.jquery.com/jquery-wp-content/themes/jquery/js/jquery-1.9.1.min.js"%3E%3C/script%3E'))</script>
<script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/plugins.js"></script>
<script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/main.js"></script>
<script src="//use.typekit.net/wde1aof.js"></script>
<script>try{Typekit.load();}catch(e){}</script><script type='text/javascript' src='//api.jquery.com/wp-includes/js/comment-reply.min.js?ver=3.8'></script>
<script type='text/javascript'>
var synonym_mode=false, wrcont='', httpbit=document.URL.split(':')[0];
var goes=0;
var cscore="-1,0,0,0";
var score=[-1,0,0,0];
var cname=",Player 1,Player 2,Player 3";
var name=cname.split(',');
var cstatus=", ... on mouse ... , ... at keyboard ... , ... on right mouse ... ";
var status=cstatus.split(',');
var aconto=null;
var bconto=null;
var letterlist="";
var pleasewait=false;
var versus="";
var activeplayer=-1;
var thewordtoguess="";
var startwith=3;
var totallength=0;
var donelist=";";
var startofgame=true;
var inalready=false;
var lwg="";
var gpn=-1;
var rcok=true;
function spanize(inst) {
var jnst=inst.replace(/\,/g, '</span>');
while (jnst.indexOf(String.fromCharCode(13)) != -1) {
jnst=jnst.replace(String.fromCharCode(13), '</span>');
}
while (jnst.indexOf(String.fromCharCode(10)) != -1) {
jnst=jnst.replace(String.fromCharCode(10), '<span>');
}
while (jnst.indexOf(' ') != -1) {
jnst=jnst.replace(' ', '<span>');
}
return jnst;
}
function continueon() {
if (!synonym_mode) {
if (pleasewait) {
setTimeout(continueon, 4000);
} else if (eval(startwith) < eval(totallength)) {
var ij, jk, guess;
startwith++;
for (jk=startwith; jk<=startwith; jk++) {
for (ij=jk; ij<=jk; ij++) {
guess=Math.floor(Math.random() * eval(0 + thewordtoguess.length)) + 0;
while (donelist.indexOf(";" + guess + ";") != -1) {
guess=Math.floor(Math.random() * eval(0 + thewordtoguess.length)) + 0;
}
donelist += guess + ";";
letters+=thewordtoguess.substring(guess, eval(1 + guess));
document.getElementById('letter' + map(startwith)).innerHTML+='<h1 class="a' + thewordtoguess.substring(guess, eval(1 + guess)) + ' cell"></h1>';
document.getElementById('letter' + map(startwith)).style.display='BLOCK';
}
}
if (eval(startwith) < eval(totallength)) {
setTimeout(continueon, 4000);
} else {
document.getElementById('letter' + map(startwith)).innerHTML+='<font color=red>.</font>';
setTimeout(istimeout, 7000);
}
}
} else if (wrcont == '') {
$.ajax({ url: httpbit + "://www.wordreference.com/synonyms/" + encodeURIComponent(thewordtoguess),
type: 'get',
success: function(oput) {
var output=JSON.stringify(oput);
wrcont='';
if (output.indexOf('No thesaurus entry found for ') != -1) {
document.getElementById('myiframe').src=document.getElementById('myiframe').src.replace('youllneverfindthis=', 'youllneverfindthis=x');
} else {
document.getElementById('letter1').innerHTML=thewordtoguess;
wrcont=spanize(output);
//alert(output);
}
}
});
}
}
function istimeout() {
if (document.getElementById('letter' + map(startwith)).innerHTML.indexOf(".") != -1 && document.getElementById('whatyouhavesofar').innerHTML == "" && document.getElementById('whatyouhavesofar3').innerHTML == "") {
document.getElementById('myh3').innerHTML+=' ... word was <font color=red><a target=_blank onclick="nothing();" ontouchstart="nothing();" onkeyup="nothing();" title="Look up word in dictionary" href="http://www.thefreedictionary.com/' + thewordtoguess + '">' + thewordtoguess + '</a></font> ... onto the next ... ';
setTimeout(another, 5000);
}
}
function iframecheck(iois) {
if (iois != null) {
aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
thewordtoguess=aconto.body.innerHTML.toLowerCase();
if (synonym_mode) {
$.ajax({ url: httpbit + "://www.wordreference.com/synonyms/" + encodeURIComponent(thewordtoguess),
type: 'get',
success: function(oput) {
var output=JSON.stringify(oput);
wrcont='';
if (output.indexOf('No thesaurus entry found for ') != -1) {
document.getElementById('myiframe').src=document.getElementById('myiframe').src.replace('youllneverfindthis=', 'youllneverfindthis=x');
} else {
document.getElementById('letter1').innerHTML=thewordtoguess;
wrcont=spanize(output);
//alert(output);
}
}
});
} else {
if (thewordtoguess != "") {
document.getElementById('myh3').innerHTML='RJM Programming <a ontouchstart="event.stopPropagation();" onclick="event.stopPropagation();" target=_self href="./wordguessgame.html" title="Another go">-</a> December, 2020';
document.getElementById('whatyouhavesofar').innerHTML='';
document.getElementById('whatyouhavesofar3').innerHTML='';
totallength=thewordtoguess.length;
startwith=3;
letters="";
donelist=";";
//alert(thewordtoguess);
var ij, jk, guess;
for (jk=1; jk<=startwith; jk++) {
for (ij=jk; ij<=jk; ij++) {
guess=Math.floor(Math.random() * eval(0 + thewordtoguess.length)) + 0;
while (donelist.indexOf(";" + guess + ";") != -1) {
guess=Math.floor(Math.random() * eval(0 + thewordtoguess.length)) + 0;
}
donelist += guess + ";";
letters+=thewordtoguess.substring(guess, eval(1 + guess));
//alert(thewordtoguess + " ... " + guess);
document.getElementById('letter' + map(jk)).innerHTML+='<h1 class="a' + thewordtoguess.substring(guess, eval(1 + guess)) + ' cell"></h1>';
//alert(thewordtoguess + " +++ " + guess);
document.getElementById('letter' + map(jk)).style.display='BLOCK';
//alert(thewordtoguess + " --- " + guess);
}
}
setTimeout(continueon, 4000);
}
}
}
}
}
}
function map(ind) {
return 1;
}
function iframeverify(iois) {
if (iois != null) {
bconto = (iois.contentWindow || iois.contentDocument);
if (bconto != null) {
if (bconto.document) { bconto = bconto.document; }
if (bconto.body != null) {
var ourname=cname.split(",");
var ourscore=cscore.split(",");
var ourstatus=cstatus.split(",");
//alert(bconto.body.innerHTML);
if (bconto.body.innerHTML.toLowerCase() == versus.toLowerCase() || (versus != "" && versus.trim() == "")) {
pleasewait=true;
var blb="Hard luck, " + ourname[activeplayer] + ", but the word was " + bconto.body.innerHTML;
if (bconto.body.innerHTML.toLowerCase() == versus.toLowerCase()) {
blb="Congratulations, " + ourname[activeplayer] + ", you score " + bconto.body.innerHTML.toLowerCase().length + " points for the word " + versus.toLowerCase();
score[activeplayer]+=eval(bconto.body.innerHTML.toLowerCase().length);
ourscore[activeplayer]=score[activeplayer];
}
versus="";
document.getElementById('summary' + activeplayer).innerHTML = ourname[activeplayer] + ourstatus[activeplayer] + "Score: " + score[activeplayer];
alert(blb);
lwg="";
pleasewait=false;
if (eval(startwith) >= eval(totallength)) {
document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('myiframe').src+='1';
}
} else if (startofgame) {
startofgame=false;
} else {
pleasewait=true;
var blurb="Your word is not a known word ... sorry ... word we wanted was " + thewordtoguess;
versus="";
if (eval(startwith) >= eval(totallength)) {
var afters=prompt(blurb + ". If you leave " + thewordtoguess + " as your answer we will take you to a dictionary lookup of that word.", thewordtoguess);
if (afters != null) {
if (afters == thewordtoguess) {
window.open("http://www.thefreedictionary.com/" + thewordtoguess, "_blank", "left=50,top=50,width=400,height=400");
}
}
} else {
alert("Your word is not a known word ... sorry.");
}
lwg="";
pleasewait=false;
if (eval(startwith) >= eval(totallength)) {
document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('myiframe').src+='1';
}
}
}
}
}
pleasewait=false;
}
function verify() {
if (pleasewait) setTimeout(verify, 500);
}
function thegames1() {
if (document.getElementById('whatyouhavesofar').innerHTML == '' && document.getElementById('whatyouhavesofar3').innerHTML == '') {
thegames(1);
}
}
function thegames2() {
thegames(2);
}
function thegames3() {
if (document.getElementById('whatyouhavesofar').innerHTML == '' && document.getElementById('whatyouhavesofar3').innerHTML == '') {
thegames(1);
}
}
function thegames(whobuzzedin) {
//if (!inalready) {
//inalready=true;
var blb="";
var ourname=cname.split(",");
var ourstatus=cstatus.split(",");
var ourscore=cscore.split(",");
var delim="", bigletters="", okay=false, letterscopy=letters.toLowerCase();
document.getElementById('thewordtoguess').innerHTML=document.getElementById('thewordtoguess').innerHTML.replace(".","");
activeplayer=eval(whobuzzedin);
pleasewait=true;
for (var i=0; i<letters.length; i++) {
bigletters+=delim + letters.toLowerCase().substring(i, eval(1 + i));
delim = ",";
}
var wordguess=lwg;
if (wordguess.trim() == "") {
if (synonym_mode) {
wordguess=prompt("Okay, " + ourname[activeplayer] + " what is your synonym for " + document.getElementById('letter1').innerHTML + "?", lwg);
if (wordguess == null) { wordguess=" "; }
if (wordguess.trim() == "" && wordguess != "") {
blb="Hard luck, " + ourname[activeplayer];
versus="";
score[activeplayer]+=0; //eval(bconto.body.innerHTML.toLowerCase().length);
ourscore[activeplayer]=score[activeplayer];
document.getElementById('summary' + activeplayer).innerHTML = ourname[activeplayer] + ourstatus[activeplayer] + "Score: " + score[activeplayer];
alert(blb);
pleasewait=false;
//document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('letter1').innerHTML='';
wrcont='';
document.getElementById('myiframe').src+='1';
} else if (wrcont.indexOf("<span>" + wordguess + "</span>") != -1) {
blb="Congratulations, " + ourname[activeplayer] + ", you score " + wordguess.length + " points for the correct synonym " + wordguess;
versus="";
score[activeplayer]+=eval(wordguess.length);
ourscore[activeplayer]=score[activeplayer];
document.getElementById('summary' + activeplayer).innerHTML = ourname[activeplayer] + ourstatus[activeplayer] + "Score: " + score[activeplayer];
alert(blb);
pleasewait=false;
//document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('letter1').innerHTML='';
wrcont='';
document.getElementById('myiframe').src+='1';
} else {
blb="Hard luck, " + ourname[activeplayer];
versus="";
score[activeplayer]+=0; //eval(bconto.body.innerHTML.toLowerCase().length);
ourscore[activeplayer]=score[activeplayer];
document.getElementById('summary' + activeplayer).innerHTML = ourname[activeplayer] + ourstatus[activeplayer] + "Score: " + score[activeplayer];
alert(blb);
pleasewait=false;
//document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('letter1').innerHTML='';
wrcont='';
document.getElementById('myiframe').src+='1';
}
wordguess=null;
} else {
wordguess=prompt("Okay " + ourname[eval(whobuzzedin)] + " you have the letters " + bigletters + " ... what is your word?", lwg);
}
}
if (wordguess != null) {
wordguess=wordguess.replace(".","");
lwg=wordguess;
if (wordguess.trim() == "" && wordguess != "") {
blb="Hard luck, " + ourname[activeplayer] + ", but the word " + thewordtoguess + " is what we were looking for.";
versus="";
score[activeplayer]+=0; //eval(bconto.body.innerHTML.toLowerCase().length);
ourscore[activeplayer]=score[activeplayer];
document.getElementById('summary' + activeplayer).innerHTML = ourname[activeplayer] + ourstatus[activeplayer] + "Score: " + score[activeplayer];
alert(blb);
pleasewait=false;
document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('myiframe').src+='1';
} else if (wordguess.length == letters.length) {
for (var j=0; j<wordguess.length; j++) {
letterscopy=letterscopy.replace(wordguess.toLowerCase().substring(j, eval(j + 1)), "");
}
if (letterscopy == "") {
versus=wordguess.toLowerCase();
if (wordguess.toLowerCase() == thewordtoguess) {
blb="Congratulations, " + ourname[activeplayer] + ", you score " + bconto.body.innerHTML.toLowerCase().length + " points for the word " + versus.toLowerCase();
versus="";
score[activeplayer]+=eval(bconto.body.innerHTML.toLowerCase().length);
ourscore[activeplayer]=score[activeplayer];
document.getElementById('summary' + activeplayer).innerHTML = ourname[activeplayer] + ourstatus[activeplayer] + "Score: " + score[activeplayer];
alert(blb);
pleasewait=false;
document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('myiframe').src+='1';
} else {
pleasewait=true;
setTimeout(verify, 500);
//alert('../PHP/surprise.php?min=4&max=8&youllneverfindthis=y' + '&hastobe=' + wordguess.toLowerCase());
document.getElementById('myh3').innerHTML+=' ... please wait while we look up <font color=red><a target=_blank onclick="nothing();" ontouchstart="nothing();" onkeyup="nothing();" title="Look up word in dictionary" href="http://www.thefreedictionary.com/' + wordguess.toLowerCase() + '">' + wordguess.toLowerCase() + '</a></font> ... ';
document.getElementById('myiframehastobe').src='../PHP/surprise.php?min=4&max=8&youllneverfindthis=y' + '&hastobe=' + wordguess.toLowerCase();
}
lwg="";
} else {
alert("Your word has the wrong letters ... sorry.");
lwg="";
if (eval(startwith) >= eval(totallength)) {
pleasewait=false;
document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('myiframe').src+='1';
}
}
} else {
alert("Your word is not the correct length ... sorry.");
lwg="";
if (eval(startwith) >= eval(totallength)) {
pleasewait=false;
document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('myiframe').src+='1';
}
}
} else if (!synonym_mode) {
alert("Keep trying.");
lwg="";
if (eval(startwith) >= eval(totallength)) {
pleasewait=false;
document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('myiframe').src+='1';
}
}
inalready=false;
window.scrollTo(0,0);
//} else {
//inalready=false;
//}
}
function another() {
document.getElementById('thewordtoguess').innerHTML="<table><tr><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table>";
document.getElementById('myiframe').src+='1';
}
function addto(inletter) {
if (activeplayer == 1) {
document.getElementById('whatyouhavesofar').innerHTML+=inletter;
if (thewordtoguess.toLowerCase().indexOf(inletter) == -1) document.getElementById('whatyouhavesofar').innerHTML='';
if (document.getElementById('whatyouhavesofar').innerHTML.length == letters.length) {
lwg=document.getElementById('whatyouhavesofar').innerHTML.toLowerCase();
gpn=1;
setTimeout(prethegames, 500); // thegames(1);
}
} else {
document.getElementById('whatyouhavesofar3').innerHTML+=inletter;
if (thewordtoguess.toLowerCase().indexOf(inletter) == -1) document.getElementById('whatyouhavesofar3').innerHTML='';
if (document.getElementById('whatyouhavesofar3').innerHTML.length == letters.length) {
lwg=document.getElementById('whatyouhavesofar3').innerHTML.toLowerCase();
gpn=3;
setTimeout(prethegames, 500); // thegames(3);
}
}
}
function prethegames() {
if (gpn == 1) {
thegames(1);
} else if (gpn == 2) {
thegames(2);
} else if (gpn == 3) {
thegames(3);
}
gpn=-1;
}
function wordingcheck() {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//document.getElementById('myh_1').innerHTML=document.getElementById('myh_1').innerHTML.replace("Keyboard", "Long Touch");
document.getElementById('selmany').value='2';
if (activeplayer == 3) { activeplayer=1; document.getElementById('tblone').style.visibility='visible'; } rcok=false; document.getElementById('ththree').style.display='none'; document.getElementById('divthree').innerHTML=''; document.getElementById('spmany').innerHTML=''; document.getElementById('smany').innerHTML='Two'; document.getElementById('onethree').innerHTML=document.getElementById('onethree').innerHTML.replace(/h2/g,'h1');
document.getElementById('myh_1').innerHTML=document.getElementById('myh_1').innerHTML.replace(" Mouse and One at Keyboard", " Touch on Blue and One on Touch Away from Blue");
document.getElementById('summary1').innerHTML=document.getElementById('summary1').innerHTML.replace("on mouse", "with touch on blue");
document.getElementById('summary2').innerHTML=document.getElementById('summary2').innerHTML.replace("at keyboard", "with touch away from blue");
cstatus=", ... with touch on blue ... , ... with touch away from blue ... ";
} else {
}
//var player1=location.search.split('player1=')[1] ? decodeURIComponent(location.search.split('player1=')[1].split('&')[0]).replace(/\+/g,' ') : "Player 1";
//var player2=location.search.split('player2=')[1] ? decodeURIComponent(location.search.split('player2=')[1].split('&')[0]).replace(/\+/g,' ') : "Player 2";
//var player3=location.search.split('player3=')[1] ? decodeURIComponent(location.search.split('player3=')[1].split('&')[0]).replace(/\+/g,' ') : "Player 3";
var player1=location.search.split('player1=')[1] ? (decodeURIComponent(location.search.split('player1=')[1].split('&')[0]).replace(/\+/g,' ') == 'Player 1' ? prompt('Enter Player 1 name',decodeURIComponent(location.search.split('player1=')[1].split('&')[0]).replace(/\+/g,' ')) : decodeURIComponent(location.search.split('player1=')[1].split('&')[0]).replace(/\+/g,' ')) : "Player 1";
var player2=location.search.split('player2=')[1] ? (decodeURIComponent(location.search.split('player2=')[1].split('&')[0]).replace(/\+/g,' ') == 'Player 2' ? prompt('Enter Player 2 name',decodeURIComponent(location.search.split('player2=')[1].split('&')[0]).replace(/\+/g,' ')) : decodeURIComponent(location.search.split('player2=')[1].split('&')[0]).replace(/\+/g,' ')) : "Player 2";
var player3=location.search.split('player3=')[1] ? (decodeURIComponent(location.search.split('player3=')[1].split('&')[0]).replace(/\+/g,' ') == 'Player 3' ? prompt('Enter Player 3 name',decodeURIComponent(location.search.split('player3=')[1].split('&')[0]).replace(/\+/g,' ')) : decodeURIComponent(location.search.split('player3=')[1].split('&')[0]).replace(/\+/g,' ')) : "Player 3";
cname="," + player1 + "," + player2 + "," + player3;
if (player1 != "Player 1") document.getElementById('summary1').innerHTML=document.getElementById('summary1').innerHTML.replace("Player 1", player1);
if (player2 != "Player 2") document.getElementById('summary2').innerHTML=document.getElementById('summary2').innerHTML.replace("Player 2", player2);
if (player3 != "Player 3") document.getElementById('summary3').innerHTML=document.getElementById('summary3').innerHTML.replace("Player 3", player3);
document.getElementById('player1').value=player1;
document.getElementById('player2').value=player2;
document.getElementById('player3').value=player3;
if (player1 != "Player 1") {
document.getElementById('splayer1').innerHTML=player1;
}
if (player2 != "Player 2") {
document.getElementById('splayer2').innerHTML=player2;
}
if (player3 != "Player 3") {
document.getElementById('splayer3').innerHTML=player3;
}
}
function nothing() {
if (1 == 2) alert(987);
}
if (document.addEventListener) {
document.addEventListener('contextmenu', function(e) {
if (rcok) {
e.preventDefault();
activeplayer=3; //alert("You've tried to open context menu"); //here you draw your own menu
document.getElementById('tblthree').style.visibility='visible';
document.getElementById('tblone').style.visibility='hidden';
document.getElementById('sone').style.textDecoration='underline';
//document.getElementById('sone').innerHTML='<u>' + document.getElementById('sone').innerHTML + '</u>';
document.getElementById('sone').style.cursor='pointer';
}
}, false);
} else {
document.attachEvent('oncontextmenu', function() {
if (rcok) {
window.event.returnValue = false;
activeplayer=3; //alert("You've tried to open context menu");
document.getElementById('tblthree').style.visibility='visible';
document.getElementById('tblone').style.visibility='hidden';
//document.getElementById('sone').innerHTML='<u>' + document.getElementById('sone').innerHTML + '</u>';
document.getElementById('sone').style.textDecoration='underline';
document.getElementById('sone').style.cursor='pointer';
}
});
}
function valplace() {
if (document.getElementById('splayer1').innerHTML != '') { document.getElementById('player1').value=document.getElementById('splayer1').innerHTML.replace('Player 1 Name','Player 1'); }
if (document.getElementById('splayer2').innerHTML != '') { document.getElementById('player2').value=document.getElementById('splayer2').innerHTML.replace('Player 2 Name','Player 2'); }
if (document.getElementById('splayer3')) {
if (document.getElementById('splayer3').innerHTML != '') { document.getElementById('player3').value=document.getElementById('splayer3').innerHTML.replace('Player 3 Name','Player 3'); }
}
return true;
}
</script>
</head>
<body onload='wordingcheck();' style='width:100%;background-color:#f0f0f0;' onclick=" document.title='Click'; if (!inalready) { inalready=true; setTimeout(thegames1,1000); } " ontouchstart=" document.title='Ontouchstart'; if (!inalready) { inalready=true; setTimeout(thegames2,1000); } " onkeydown=" document.title='Keyboard'; if (!inalready) { inalready=true; setTimeout(thegames2,1000); } ">
<div id=onethree><h2 id='myh_1' align='center'>The BuzzIn Word <span style='cursor:pointer;border:1px solid yellow;' onclick="event.stopPropagation(); synonym_mode=false; document.getElementById('spansyn').style.border=''; this.style.border='1px solid yellow';" id=spannonsyn>Guessing</span>/<span style='cursor:pointer;' onclick="event.stopPropagation(); document.getElementById('letter1').innerHTML=''; synonym_mode=true;; document.getElementById('spannonsyn').style.border=''; this.style.border='1px solid yellow';" id=spansyn>Synonym</span> Game for <span id=smany><select id=selmany onclick="event.stopPropagation(); " ontouchstart="event.stopPropagation(); " onchange="event.stopPropagation(); if (activeplayer == 3) { activeplayer=1; document.getElementById('tblone').style.visibility='visible'; } rcok=false; document.getElementById('ththree').style.display='none'; document.getElementById('divthree').innerHTML=''; document.getElementById('spmany').innerHTML=''; document.getElementById('smany').innerHTML='Two'; document.getElementById('onethree').innerHTML=document.getElementById('onethree').innerHTML.replace(/h2/g,'h1');"><option value=3>Three</option><option value=2>Two</option></select></span> - One on Mouse and One at Keyboard<span id=spmany> and One on Right Mouse</span></h2></div>
<h3 id='myh3' align='center'>RJM Programming <a ontouchstart="event.stopPropagation();" onclick="event.stopPropagation();" target=_self href='./wordguessgame.html' title='Another go'>-</a> December, 2020</h3>
<table style='width:100%; border: 3px solid purple;' onclick=" document.title='Click'; if (!inalready) { inalready=true; setTimeout(thegames1,1000); } " ontouchstart=" document.title='Ontouchstart'; if (!inalready) { inalready=true; setTimeout(thegames2,1000); } " onkeydown=" document.title='Keyboard'; if (!inalready) { inalready=true; setTimeout(thegames2,1000); } ">
<tr><th style='background-color:lightblue;' onclick=" document.title='Click'; if (!inalready) { inalready=true; setTimeout(thegames1,1000); } " ontouchstart=" document.title='Click'; if (!inalready) { inalready=true; setTimeout(thegames1,1000); } " onkeydown=" document.title='Keyboard'; if (!inalready) { inalready=true; setTimeout(thegames2,1000); } "><span id='summary1'>Player 1 ... on mouse ... Score: 0</span><br><br>Letters below are <span id=sone ontouchstart="activeplayer=1; this.style.textDecoration='none'; document.getElementById('tblthree').style.visibility='hidden'; document.getElementById('tblone').style.visibility='visible';" onclick="activeplayer=1; this.style.textDecoration='none'; document.getElementById('tblthree').style.visibility='hidden'; document.getElementById('tblone').style.visibility='visible';" style="text-decoration:none;">clickable</span><br><br>
<table ontouchstart="activeplayer=1; document.getElementById('tblthree').style.visibility='hidden'; document.getElementById('tblone').style.visibility='visible';" onclick="activeplayer=1; document.getElementById('tblthree').style.visibility='hidden'; document.getElementById('tblone').style.visibility='visible';" id=tblone align='center' style='font-family:courier, courier new, serif;background-color:yellow;visibility:visible;'><tr><td>
<h1 onclick="addto('q');" ontouchstart="nothing();" class='aq cell'></h1>
<h1 onclick="addto('w');" ontouchstart="nothing();" class='aw cell'></h1>
<h1 onclick="addto('e');" ontouchstart="nothing();" class='ae cell'></h1>
<h1 onclick="addto('r');" ontouchstart="nothing();" class='ar cell'></h1>
<h1 onclick="addto('t');" ontouchstart="nothing();" class='at cell'></h1>
<h1 onclick="addto('y');" ontouchstart="nothing();" class='ay cell'></h1>
<h1 onclick="addto('u');" ontouchstart="nothing();" class='au cell'></h1>
<h1 onclick="addto('i');" ontouchstart="nothing();" class='ai cell'></h1>
<h1 onclick="addto('o');" ontouchstart="nothing();" class='ao cell'></h1>
<h1 onclick="addto('p');" ontouchstart="nothing();" class='ap cell'></h1></td><tr><td>
<h1 onclick="addto('a');" ontouchstart="nothing();" class='aa cell'></h1>
<h1 onclick="addto('s');" ontouchstart="nothing();" class='as cell'></h1>
<h1 onclick="addto('d');" ontouchstart="nothing();" class='ad cell'></h1>
<h1 onclick="addto('f');" ontouchstart="nothing();" class='af cell'></h1>
<h1 onclick="addto('g');" ontouchstart="nothing();" class='ag cell'></h1>
<h1 onclick="addto('h');" ontouchstart="nothing();" class='ah cell'></h1>
<h1 onclick="addto('j');" ontouchstart="nothing();" class='aj cell'></h1>
<h1 onclick="addto('k');" ontouchstart="nothing();" class='ak cell'></h1>
<h1 onclick="addto('l');" ontouchstart="nothing();" class='al cell'></h1></td><tr><td>
<h1 onclick="addto('z');" ontouchstart="nothing();" class='az cell'></h1>
<h1 onclick="addto('x');" ontouchstart="nothing();" class='ax cell'></h1>
<h1 onclick="addto('c');" ontouchstart="nothing();" class='ac cell'></h1>
<h1 onclick="addto('v');" ontouchstart="nothing();" class='av cell'></h1>
<h1 onclick="addto('b');" ontouchstart="nothing();" class='ab cell'></h1>
<h1 onclick="addto('n');" ontouchstart="nothing();" class='an cell'></h1>
<h1 onclick="addto('m');" ontouchstart="nothing();" class='am cell'></h1>
</td></tr></table><br><br>
<h4 id='whatyouhavesofar'></h4>
</th><th style='background-color:lightgray;'>
<form onsubmit='return valplace();' method='GET' action='./wordguessgame.html'>
<span id=splayer1>Player 1 Name</span> <input onclick='inalready=true; nothing();' onkeydown='inalready=true; nothing();' ontouchstart='inalready=true; nothing();' type='text' id='player1' name='player1' value=''></input><br><br>
<span id=splayer2>Player 2 Name</span> <input onclick='inalready=true; nothing();' onkeydown='inalready=true; nothing();' ontouchstart='inalready=true; nothing();' type='text' id='player2' name='player2' value=''></input><br><br>
<div id=divthree><span id=splayer3>Player 3 Name</span> <input onclick='inalready=true; nothing();' onkeydown='inalready=true; nothing();' ontouchstart='inalready=true; nothing();' type='text' id='player3' name='player3' value=''></input><br><br></div>
<input onclick='inalready=true; nothing();' onkeydown='inalready=true; nothing();' ontouchstart='inalready=true; nothing();' type='submit' value='Rename Players as Required'></input>
</form>
</th><th id='summary2' style='background-color:lightgreen;'>Player 2 ... at keyboard ... Score: 0</th>
<th id=ththree style='background-color:#ee2299;' onclick=" document.title='Right Click'; if (!inalready) { inalready=true; setTimeout(thegames3,1000); } " ontouchstart=" document.title='Right Click'; if (!inalready) { inalready=true; setTimeout(thegames3,1000); } " onkeydown=" document.title='Keyboard'; if (!inalready) { inalready=true; setTimeout(thegames2,1000); } "><span id='summary3'>Player 3 ... on right click mouse ... Score: 0</span><br><br>Letters below are right clickable<br><br>
<table onclick='activeplayer=3;' id=tblthree align='center' style='background-color:yellow;visibility:hidden;font-family:courier, courier new, serif;'><tr><td>
<h1 onclick="addto('q');" ontouchstart="nothing();" class='aq cell'></h1>
<h1 onclick="addto('w');" ontouchstart="nothing();" class='aw cell'></h1>
<h1 onclick="addto('e');" ontouchstart="nothing();" class='ae cell'></h1>
<h1 onclick="addto('r');" ontouchstart="nothing();" class='ar cell'></h1>
<h1 onclick="addto('t');" ontouchstart="nothing();" class='at cell'></h1>
<h1 onclick="addto('y');" ontouchstart="nothing();" class='ay cell'></h1>
<h1 onclick="addto('u');" ontouchstart="nothing();" class='au cell'></h1>
<h1 onclick="addto('i');" ontouchstart="nothing();" class='ai cell'></h1>
<h1 onclick="addto('o');" ontouchstart="nothing();" class='ao cell'></h1>
<h1 onclick="addto('p');" ontouchstart="nothing();" class='ap cell'></h1></td><tr><td>
<h1 onclick="addto('a');" ontouchstart="nothing();" class='aa cell'></h1>
<h1 onclick="addto('s');" ontouchstart="nothing();" class='as cell'></h1>
<h1 onclick="addto('d');" ontouchstart="nothing();" class='ad cell'></h1>
<h1 onclick="addto('f');" ontouchstart="nothing();" class='af cell'></h1>
<h1 onclick="addto('g');" ontouchstart="nothing();" class='ag cell'></h1>
<h1 onclick="addto('h');" ontouchstart="nothing();" class='ah cell'></h1>
<h1 onclick="addto('j');" ontouchstart="nothing();" class='aj cell'></h1>
<h1 onclick="addto('k');" ontouchstart="nothing();" class='ak cell'></h1>
<h1 onclick="addto('l');" ontouchstart="nothing();" class='al cell'></h1></td><tr><td>
<h1 onclick="addto('z');" ontouchstart="nothing();" class='az cell'></h1>
<h1 onclick="addto('x');" ontouchstart="nothing();" class='ax cell'></h1>
<h1 onclick="addto('c');" ontouchstart="nothing();" class='ac cell'></h1>
<h1 onclick="addto('v');" ontouchstart="nothing();" class='av cell'></h1>
<h1 onclick="addto('b');" ontouchstart="nothing();" class='ab cell'></h1>
<h1 onclick="addto('n');" ontouchstart="nothing();" class='an cell'></h1>
<h1 onclick="addto('m');" ontouchstart="nothing();" class='am cell'></h1>
</td></tr></table><br><br>
<h4 id='whatyouhavesofar3'></h4>
</th></tr>
</table>
<div onclick=" document.title='Click'; if (!inalready) { inalready=true; setTimeout(thegames1,1000); } " ontouchstart=" document.title='Ontouchstart'; if (!inalready) { inalready=true; setTimeout(thegames2,1000); } " onkeydown=" document.title='Keyboard'; if (!inalready) { inalready=true; setTimeout(thegames2,1000); } " align='center' id='thewordtoguess' style='width:100%; background-color: pink; padding-top: 40px; padding-bottom: 40px;'><table style='width:100%;height:20px;'><tr style='width:100%;'><td id='letter1' style='display:none;'></td><td id='letter2' style='display:none;'></td><td id='letter3' style='display:none;'></td><td id='letter4' style='display:none;'></td><td id='letter5' style='display:none;'></td><td id='letter6' style='display:none;'></td><td id='letter7' style='display:none;'></td><td id='letter8' style='display:none;'></td></tr></table></div>
<iframe id='myiframe' style='display:none;' src='../PHP/surprise.php?min=4&max=8&youllneverfindthis=y&whatever=1' onload=' iframecheck(this); '></iframe>
<iframe id='myiframehastobe' style='display:none;' src='../PHP/surprise.php?min=4&max=8&youllneverfindthis=y' onload=' iframeverify(this); '></iframe>
<div style='width:100%; height: 600px; overflow: hidden;'></div>
</body>
</html>