Tag Archives: cell

Just Javascript Card Game Google Translate Tutorial

Yesterday’s Just Javascript Card Game Functional Background Buttons Tutorial set up the conditions needed to … integrate Google Translate as either/both … popup window form of alerting 500 or bridge card game hoster that something changed with the bidding (just, so far) … audio form via Google Translate text to audio functionality (which it is up to the hoster to make happen themselves) via a new “Functional Background Button” in our “Just Javascript” (ie. no body definition) parent window conditions … via … function cbaudio(cby, notset) { if (notset != ”) { if (!doaudio) { doaudio=!doaudio; if (doaudio) { setTimeout(stcbaudio, 1000); } } if (doaudio && in_bidding && !in_kitty && cbid.substring(0,1) >= ‘1’ && cbid.substring(0,1) <= ‘9’) { wordsare=(” + pnames[eval(-1 + cby)]).replace(‘undefined’,(‘Player ‘ + cby).replace(‘undefined’,” + bidplayer)) + ‘ bid ‘ + cbid.substring(0,1) + ‘ ‘ + cbid.substring(1,2).replace(‘n’,’No Trump’).replace(‘c’,’Club’).replace(‘d’,’Diamond’).replace(‘s’,’Spade’).replace(‘h’,’Heart’).replace(‘0′,’No Trump’) + ‘s’; if (doaudio && wordsare != lastwordsare) { if (lastwordsare.indexOf(wordsare) == 0) { wordsare=lastwordsare; } else { lastwordsare=wordsare; } if (twois && wordsare != lwordsare) { if (!twois.closed) { twois.close(); } } if (wordsare != lwordsare) { lwordsare=wordsare; twois=window.open(‘//translate.google.com/?sl=auto&tl=en&text=’ + encodeURIComponent(wordsare) + ‘%0A&op=translate’, ‘_blank’, ‘left=100,top=100,width=500,height=500’); } } } else if (doaudio && in_bidding && !in_kitty && cbid.toLowerCase() != ‘none’) { wordsare=(” + pnames[eval(-1 + cby)]).replace(‘undefined’,(‘Player ‘ + cby).replace(‘undefined’,” + bidplayer)) + ‘ bid ‘ + cbid; if (doaudio && wordsare != lastwordsare) { if (lastwordsare.indexOf(wordsare) == 0) { wordsare=lastwordsare; } else { lastwordsare=wordsare; } if (twois && wordsare != lwordsare) { if (!twois.closed) { twois.close(); } } if (wordsare != lwordsare) { lwordsare=wordsare; twois=window.open(‘//translate.google.com/?sl=auto&tl=en&text=’ + encodeURIComponent(wordsare) + ‘%0A&op=translate’, ‘_blank’, ‘left=100,top=100,width=500,height=500’); } } } else if (doaudio && in_kitty && cbid.toLowerCase() != ‘none’ && wordsare.indexOf(‘ and now asking them about the kitty’) == -1) { wordsare+=’ and now asking them about the kitty’; if (doaudio && wordsare != lastwordsare) { if (lastwordsare.indexOf(wordsare) == 0) { wordsare=lastwordsare; } else { lastwordsare=wordsare; } if (twois && wordsare != lwordsare) { if (!twois.closed) { twois.close(); } } if (wordsare != lwordsare) { lwordsare=wordsare; twois=window.open(‘//translate.google.com/?sl=auto&tl=en&text=’ + encodeURIComponent(wordsare) + ‘%0A&op=translate’, ‘_blank’, ‘left=100,top=100,width=500,height=500’); } } } else if (doaudio && !in_bidding && !in_kitty && cbid.toLowerCase() != ‘none’ && wordsare != ” && wordsare.indexOf(‘ and now starting to play the cards by leading off’) == -1) { wordsare+=’ and now starting to play the cards by leading off’; if (doaudio && wordsare != lastwordsare) { if (lastwordsare.indexOf(wordsare) == 0) { wordsare=lastwordsare; } else { lastwordsare=wordsare; }

Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Just Javascript Card Game Functional Background Buttons Tutorial

Recent blog posts in our recent “Just Javascript” card game series such as yesterday’s Just Javascript Card Game Invalid Bids Tutorial had us restart our interest in window.open popups to allow for large readable card and suit emoji fonts. They worked for non-remote players … during the bidding phase where a “?” answer to a Javascript prompt popup could work the logic … and today we add to that … after the bidding phase a background table cell (let’s call it a “functional background button”) which can be clicked or touched that can work the logic after the times where Javascript prompt popups are used There are four variable values to slot in between the card hiding table cells and the linear gradient overlay background to tabular cell background … var lastbr=’,no-repeat’; var lastbi=”, 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(0,255,0,0.1);fill:black;font-family:Verdana;font-size:30px;’><text y=’65%’>?</text></svg>\”)”; var lastbs … via … var ione=1; while (Math.abs(eval(eval(” + opltlistt[ione]) – eval(” + opltlistt[0]))) < 1) { ione++; } lastbs=(‘,’ + eval(eval(” + opltlistl[1]) – eval(” + opltlistl[0]))).split(‘.’)[0] + (‘px ‘ + eval(eval(” + opltlistt[ione]) – eval(” + opltlistt[0]))).split(‘.’)[0] + ‘px’; var lastbp … via … var opltlistlpush=(eval(eval(” + opltlistl[eval(-1 + eval(” + opltlistl.length))]) + eval(1 * (eval(” + opltlistl[1]) – eval(” + opltlistl[0]))))); jhuh=eval(-1 + opltlistl.length); lastbp=(‘,’ + eval(” + opltlistlpush)).split(‘.’)[0] + (‘px ‘ + eval(” + opltlistt[eval(0 + jhuh)])).split(‘.’)[0] + ‘px’; … timed for calculation as the last card hiding table cell is called into our inhouse “windowopen” Javascript function, and used in … 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:’, lastbr + ‘ ,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:’, lastbr + ‘ ,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:’, lastbr + ‘,repeat,repeat’ + ‘ ;background-size:’); } else { defstyle=defstyle.replace(‘;background-size:’, lastbr + ‘,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:’, lastbs + covercover + ‘ ;background-position:’); } else { defstyle=defstyle.replace(‘;background-position:’, lastbs + 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:’, lastbs + ‘,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:’, lastbs + ‘,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:’, lastbs + ‘,’ + eval(0.7 * window.innerWidth)

Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Just Javascript Card Game Invalid Bids Tutorial

Yesterday’s Just Javascript Card Game Popup Alert Tutorial tended towards intolerance towards invalid bid answering during the bidding phase for non-remote 500 or bridge card game players, so, today, we tended to these niceties below … checking and reasking for Javascript prompt popup invalid interactive answers parameterizing the “500” for 500 card game and “100” for bridge card game (scoring) totals (needed) that win a game added bidding phase nuanced display to go with longer delays (useful to practically separate the viewing of other player’s cards) for (first applies to non-remote) 500 or bridge player play … Bid (please, others, turn) away Player 1 Bid (via email) away Player 1 Bid (via SMS) away Player 1 improved window.open popup window closes between player bids click in first unoccupied table cell (after kitty’s 3 in the case of 500) redisplays current player’s cards (in format like with yesterday’s work) function myalertmc(wh) { gwh=wh; for (var invc=1; invc<=eval(” + nominal_numplayers); invc++) { if (suitpops[eval(-1 + invc)]) { if (!suitpops[eval(-1 + invc)].closed) { suitpops[eval(-1 + invc)].close(); suitpops[eval(-1 + invc)]=null; } } } if (gwh.indexOf(zsuffs[eval(-1 + curplayer)]) != -1) { gwh=gwh.replace(zsuffs[eval(-1 + curplayer)], reorderz(curplayer,’ ‘)); } if (passcnt != 0 && donelistis.indexOf(‘,’ + curplayer + ‘,’) != -1) { //alert(‘CPius’); gmyalertmc(); } else if (in_bidding || cbid.toLowerCase() == ‘none’) { if ((” + emailsms[eval(-1 + bidplayer)]).replace(‘undefined’,”).trim() == ”) { //alert(” + scoresuffix); defstyle=defstyle.replace(‘Bid away ‘, ‘Bid (please, others, turn) away ‘).replace(‘Bid (via email) away ‘, ‘Bid (please, others, turn) away ‘).replace(‘Bid (via SMS) away ‘, ‘Bid (please, others, turn) away ‘); var prevcsuff=csuff; csuff=”; var hjg=” + bidplayer; for (var 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); document.head.innerHTML+=bpmore(defstyle); setTimeout(gmyalertmc, 8000); } else { if ((” + emailsms[eval(-1 + bidplayer)]).replace(‘undefined’,”).trim().indexOf(‘@’) != -1) { if (defstyle.indexOf(‘ (via email) ‘) == -1) { defstyle=defstyle.replace(‘Bid away ‘, ‘Bid (via email) away ‘).replace(‘Bid (please, others, turn) away ‘, ‘Bid (via email) away ‘).replace(‘Bid (via SMS) away ‘, ‘Bid (via email) away ‘); document.head.innerHTML+=bpmore(defstyle); } } else { if (defstyle.indexOf(‘ (via SMS) ‘) == -1) { defstyle=defstyle.replace(‘Bid away ‘, ‘Bid (via SMS) away ‘).replace(‘Bid (please, others, turn) away ‘, ‘Bid (via SMS) away ‘).replace(‘Bid (via email) away ‘, ‘Bid (via SMS) away ‘); document.head.innerHTML+=bpmore(defstyle); } } //defstyle=defstyle.replace(‘Bid away ‘, ‘Bid (please, others, turn) away ‘).replace(‘Bid (via email) away ‘, ‘Bid (please,

Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Just Javascript Card Game Popup Alert Tutorial

If you’ve “lasted the distance” in this “Just Javascript” blog posting thread right back to the days of the Memories card game, you’ll know we started this “no body definition” (in the parent window) way back then adding “card intelligence” via popup windows (ie. windows that use window.open and keep a track of them via window.open’s return value and the window.opener value from the popup window point of view back to the parent). Well … It’s the Return of the Popup! So, with yesterday’s Just Javascript Card Game Suit Sort Tutorial you may recall … the prompt popup window does not allow for copy/paste of the prompt, but the alert box does, and so answers of “?” at some prompt windows, present relevant player cards in an alert box whereby its copy/paste capabilities may offer the player the chance to increase the emoji card font size to be better readable, in n on-remote player scenarios … well, that “alert” Javascript popup window still holds because there are that many ways window.open scenarios can fail these days, it becomes our “?” logic fallback position. But if window.open works, well, the whole “can not see what cards we have for non-remote players” dilemma can be resolved by either/both … still, copy/paste contents to a third party text editor or viewer … but more happily in our mind … our inhouse window.open popups are designed to show these card and suit emojis with a big font that should help … and … … also we sequence this window.open popup ahead of a prompt Javascript window “reask” (of the same question) that self-minimizes after 8 seconds (extendable via your own window.open clicks). A long running bugbear, for us, and perhaps for you, gets a makeover improvement, we hope you agree?! And so, try the new improved Bridge and 500 game functionality at the changed cards_usefocus.html code behind the “Just Javascript” Memories Card Game or live run with single window (good for mobile) or default live run (for your platform, and if non-mobile it will try child popup windows). Try adding “.0” to number of card players to play (our hybrid) “500” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “500 card game” players (who can affect the game remotely via email)! Try adding “.1” to number of card players to play (our hybrid) “Bridge” card game,

Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Just Javascript Card Game Suit Sort Tutorial

Onto yesterday’s Just Javascript Bridge Card Game Redouble Tutorial we have two improvements to show today, they being … for 500 and bridge card games we now add to the sorting of cards into suits, the sorting of cards within that suit (to the best of our ability, in the case of 500) the prompt popup window does not allow for copy/paste of the prompt, but the alert box does, and so answers of “?” at some prompt windows, present relevant player cards in an alert box whereby its copy/paste capabilities may offer the player the chance to increase the emoji card font size to be better readable, in n on-remote player scenarios Below is the new non-remote card display sorting Javascript functionality … function reorderz(inpn) { var inm=0; var newz=”; var rone=”; var newzs=[]; var zz=’00’; var thec=’c’; var thes=’s’; var rin=ysuffs[eval(-1 + eval(” + inpn))].substring(1).split(” + inpn + doteleven)[0].split(‘ ‘); if (card_game.toLowerCase() == ‘500ish’) { zz=’17’; thec=’C’; thes=’S’; } for (inm=0; inm<rin.length; inm++) { if (rin[inm].indexOf(‘,’) != -1) { rone=rin[inm].split(‘,’)[1] + “.gif”; if (rone.indexOf(‘c.’) != -1) { rone=thec + rone.replace(‘c.’,’.’); } else if (rone.indexOf(‘s.’) != -1) { rone=thes + rone.replace(‘s.’,’.’); } else if (rone.indexOf(‘d.’) != -1) { rone=’d’ + rone.replace(‘d.’,’.’); } else if (rone.indexOf(‘h.’) != -1) { rone=’h’ + rone.replace(‘h.’,’.’); } //alert(rone.replace(’11’,zz).replace(’02’,’92’).replace(’03’,’83’).replace(’04’,’74’).replace(’05’,’65’).replace(’06’,’56’).replace(’07’,’47’).replace(’08’,’38’).replace(’09’,’29’).replace(’10’,’18’).replace(’12’,’16’).replace(’13’,’15’) + ‘,’ + inm); newzs.push(rone.replace(’11’,zz).replace(’02’,’92’).replace(’03’,’83’).replace(’04’,’74’).replace(’05’,’65’).replace(’06’,’56’).replace(’07’,’47’).replace(’08’,’38’).replace(’09’,’29’).replace(’10’,’18’).replace(’12’,’16’).replace(’13’,’15’) + ‘,’ + inm); } } if (newzs.length == 0) { return zsuffs[eval(-1 + eval(” + inpn))].split(” + inpn + doteleven)[0]; } else { newzs.sort(); for (inm=0; inm<newzs.length; inm++) { newz+=’ ‘ + ysuffs[eval(-1 + eval(” + inpn))].substring(1).split(‘ ‘)[eval(” + newzs[inm].split(‘,’)[1])].split(‘,’)[0]; } } return newz + ‘ (if too small ? shows alert box where copy/paste might help)’; } So try the new improved Bridge and 500 game functionality at the changed cards_usefocus.html code behind the “Just Javascript” Memories Card Game or live run with single window (good for mobile) or default live run (for your platform, and if non-mobile it will try child popup windows). Try adding “.0” to number of card players to play (our hybrid) “500” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “500 card game” players (who can affect the game remotely via email)! Try adding “.1” to number of card players to play (our hybrid) “Bridge” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “Bridge card game” players (who

Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Just Javascript Bridge Card Game Redouble Tutorial

Onto yesterday’s Just Javascript Bridge Card Game Primer Tutorial, as a “difference”, we add some Bridge card game scoring logic that does not happen with the 500 card game … double and redouble (pseudo) bids (affecting scoring) … representing the first dynamically applicable bidding options in the Bridge card game (and there were none in 500 card game) … “double” bid immediately applied to the (so far) leading bid (by the opposition) applying a factor of 2 to the scoring “redouble” bid immediately applied by the leading bid partner to the “double” bid immediately applied to the (so far) leading bid (by the opposition) applying a factor of 4 to the scoring … all … brought back to the default scoring factor of 1 by any new higher leading bid … as per … var dsdn=” style=’display:none;'”; var rsdn=” style=’display:none;'”; var doublefactor=1; 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; } // // used in email creation 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>’); Try the new Bridge game functionality at the changed cards_usefocus.html code behind the “Just Javascript” Memories Card Game or live run with single window (good for mobile) or default live run (for your platform, and if non-mobile it will try child popup windows). Try adding “.0” to number of card players to play (our hybrid) “500” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “500 card game” players (who can affect the game remotely via email)! Try adding “.1” to number of card players to play (our hybrid) “Bridge” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “Bridge card game” players (who can affect the game

Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Just Javascript Bridge Card Game Primer Tutorial

“Commonalities and differences” is a strategy for code development. A good enough guinea pig and you can shape it into something “similar, but different”. The 500 card game of recent times has code to shape into a Bridge card game with some provisos … Bridge scoring we have only started … it is far more complicated than 500 card game scoring Bridge is simpler regarding kitties … there are none Bridge is simpler regarding bowers and Jokers … there are none Bridge has 13 tricks per round, while 500 card game has 10 Contract Bridge has teams of 2 x 2 like 500 card game Bridge has bidding like 500 but more options and no Misère … but … like the 500 card game’s Open Misère bid the partner of the winning bidder in Bridge always exposes their hand … and so can you see why the work of yesterday’s Just Javascript Five Hundred Card Game Early Complete Exit Tutorial is such a good guinea pig for a big leg up developing a Bridge Card Game web application “Just Javascript”?! We created a “mapping function” to help … 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; } … with a whole lot of “if logic” codelines such as … if (card_game == ulgame(‘500ISH’)) { // 500 2 x 2 or Bridge 2 x 2 logic can go here } … amongst a lot of other web inspector inspired changes to get to the changed cards_usefocus.html code behind the “Just Javascript” Memories Card Game or live run with single window (good for mobile) or default live run (for your platform, and if non-mobile it will try child popup windows). Try adding “.0” to number of card players to play (our hybrid) “500” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “500 card game” players (who can affect the game remotely via email)! Try adding “.1” to number of card players to play (our hybrid) “Bridge” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “Bridge card game” players (who can affect the game remotely via email)! Previous relevant

Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Just Javascript Five Hundred Card Game Early Complete Exit Tutorial

Yesterday’s Just Javascript Five Hundred Card Game Early Exit Tutorial talked of … “Early Exit” from a “round” of 500 card game play that contributes to, depending on how competitive you make these things, scoring towards that 500 (or -500 … boo hoo) completion of the “official” version of the game … but … perhaps you have a fierce Player 1 and Player 3 versus Player 2 and Player 4 rivalry going on … no fisticuffs, pleeeeeaaaaassssse … which makes you interested, as far as playing 500 goes with keeping track of that Player 1 and Player 3 versus Player 2 and Player 4 rivalry in terms of scoring, perhaps ongoing, which we can help with, and carry through, if you have that remote email player arrangement In that last case above, we arrange automation of the scoring, in our variable “scoresuffix” … so that … on a player team reaching 500 or the other reaching -500 … in that arrangement with all remote lowercase email addresses defined … we now “chain along” (into our GET ? and & arguments) a new “overallss” of the form … &overallss=[Player 1 and Player 3 score],[Player 2 and Player 4 score] … facilitating … on such a scenario, the “chain along” of the “scoresuffix” becomes … &scoresuffix=0.0,0.0,0.0,0.0 … effectively completing resetting the 500 card game … but … remembering the rivalry, recording the “overallss” situation within the subject lines of the emails that get sent out when a trick is won, this trick triggering an exit from the “round of play” and from “the 500 card game” as nominally understood … as per … 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],

Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment