Tag Archives: FormData

Just Javascript Card Game Say My Memory Tutorial

As you would glean from yesterday’s Just Javascript Card Game Language Tutorial the combination of use of … macOS say audio … with … My Memory language translations … are stellar performers. But yesterday’s language translations architecture asks a lot of My Memory API, asking for far too many visits to this website to our liking. What if we were to, instead … ask for only one visit per non-English language encountered … by using … comma delimitation in the string presented for translation … so that … knowledge of both that … comma delimitation in destination translation … teamed with … inhouse knowledge of data such as player names and numbers … can have us piecing together translated audio to supplement the Google Translate visuals (and/or user used audio) for a useful non-English audio/visual commentary to accompany the 500 or bridge card game in our “Just Javascript” scenario, only today it is asn Intranet localhost adjunct to that parent web application, with the changed say.php PHP and MAMP interface to macOS say command brilliance. This is part one of a two day job getting to our destination, based on a “data storage” solution we’ve discussed before, that being the idea of storing data within the PHP code itself. Previous relevant Just Javascript Card Game Language Tutorial is shown below. The recent Google Translate and macOS say audio functionality featuring in yesterday’s Just Javascript Card Game Errors Tutorial lends itself to is … a popup notification type of feel perhaps an audio … via macOS say command … feel … but as of yesterday this commentary was just in English … but today … we add non-English translations … directly for the Google Translate functionality … and … via the brilliant “My Memory” API when it comes to interfacing to macOS say command, including, where possible, the tailoring of the voice of this translation … via say’s -v switch … still “Just Javascript” (ie. no body definition) in the parent window because we use Ajax techniques as per new Javascript code … var langarr=[‘af-Afrikaans’, // afrikaans. ‘ar-Arabic’, // arabic. ‘bg-Bulgarian’, // bulgarian. ‘ca-Catalan’, // catalan. ‘cs-Czech’, // czech. ‘da-Danish’, // danish. ‘de-German’, // german. ‘el-Greek’, // greek. ‘en-English’, // english. ‘es-Spanish’, // spanish. ‘et-Estonian’, // estonian. ‘fi-Finnish’, // finnish. ‘fr-French’, // french. ‘gl-Galician’, // galician. ‘he-Hebrew’, // hebrew. ‘hi-Hindi’, // hindi. ‘hr-Croatian’, // croatian. ‘hu-Hungarian’, // hungarian. ‘id-Indonesian’, // indonesian.

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

Just Javascript Card Game Language Tutorial

The recent Google Translate and macOS say audio functionality featuring in yesterday’s Just Javascript Card Game Errors Tutorial lends itself to is … a popup notification type of feel perhaps an audio … via macOS say command … feel … but as of yesterday this commentary was just in English … but today … we add non-English translations … directly for the Google Translate functionality … and … via the brilliant “My Memory” API when it comes to interfacing to macOS say command, including, where possible, the tailoring of the voice of this translation … via say’s -v switch … still “Just Javascript” (ie. no body definition) in the parent window because we use Ajax techniques as per new Javascript code … var langarr=[‘af-Afrikaans’, // afrikaans. ‘ar-Arabic’, // arabic. ‘bg-Bulgarian’, // bulgarian. ‘ca-Catalan’, // catalan. ‘cs-Czech’, // czech. ‘da-Danish’, // danish. ‘de-German’, // german. ‘el-Greek’, // greek. ‘en-English’, // english. ‘es-Spanish’, // spanish. ‘et-Estonian’, // estonian. ‘fi-Finnish’, // finnish. ‘fr-French’, // french. ‘gl-Galician’, // galician. ‘he-Hebrew’, // hebrew. ‘hi-Hindi’, // hindi. ‘hr-Croatian’, // croatian. ‘hu-Hungarian’, // hungarian. ‘id-Indonesian’, // indonesian. ‘it-Italian’, // italian. ‘ja-Japanese’, // japanese. ‘ko-Korean’, // korean. ‘ka-Georgian’, // georgian. ‘lt-Lithuanian’, // lithuanian. ‘lv-Latvian’, // latvian. ‘ms-Malay’, // malay. ‘nl-Dutch’, // dutch. ‘no-Norwegian’, // norwegian. ‘pl-Polish’, // polish. ‘pt-Portuguese’, // portuguese. ‘ro-Romanian’, // romanian. ‘ru-Russian’, // russian. ‘sk-Slovak’, // slovak. ‘sl-Slovenian’, // slovenian. ‘sq-Albanian’, // albanian. ‘sr-Serbian’, // serbian. ‘sv-Swedish’, // swedish. ‘th-Thai’, // thai. ‘tr-Turkish’, // turkish. ‘uk-Ukrainian’, // ukrainian. ‘zh-Chinese’ // chinese. ]; var sayvoices=[“Alex;en_US”, “Alice;it_IT”, “Alva;sv_SE”, “Amelie;fr_CA”, “Anna;de_DE”, “Carmit;he_IL”, “Damayanti;id_ID”, “Daniel;en_GB”, “Diego;es_AR”, “Ellen;nl_BE”, “Fiona;en_scotland”, “Fred;en_US”, “Ioana;ro_RO”, “Joana;pt_PT”, “Jorge;es_ES”, “Juan;es_MX”, “Kanya;th_TH”, “Karen;en_AU”, “Kyoko;ja_JP”, “Laura;sk_SK”, “Lekha;hi_IN”, “Luca;it_IT”, “Luciana;pt_BR”, “Maged;ar_SA”, “Mariska;hu_HU”, “Mei-Jia;zh_TW”, “Melina;el_GR”, “Milena;ru_RU”, “Moira;en_IE”, “Monica;es_ES”, “Nora;nb_NO”, “Paulina;es_MX”, “Samantha;en_US”, “Sara;da_DK”, “Satu;fi_FI”, “Sin-ji;zh_HK”, “Tessa;en_ZA”, “Thomas;fr_FR”, “Ting-Ting;zh_CN”, “Veena;en_IN”, “Victoria;en_US”, “Xander;nl_NL”, “Yelda;tr_TR”, “Yuna;ko_KR”, “Yuri;ru_RU”, “Zosia;pl_PL”, “Zuzana;cs_CZ” ]; function showStuffT(evt) { var inmsg=”; var newblurbis=”; if (zxhr.readyState == 4) { if (zxhr.status == 200) { // {“responseData”:{“translatedText”:”Ciao Mondo!”,”match”:1},”quotaFinished”:false,”mtLangSupported”:null,”responseDetails”:””,”responseStatus”:200,”responderId”:”7″,”exception_code”:null,”matches”:[{“id”:”633912766″,”segment”:”Hello World!”,”translation”:”Ciao Mondo!”,”source”:”en-GB”,”target”:”it-IT”,”quality”:”74″,”reference”:null,”usage-count”:95,”subject”:”All”,”created-by”:”MateCat”,”last-updated-by”:”MateCat”,”create-date”:”2021-05-19 12:15:47″,”last-update-date”:”2021-05-19 12:15:47″,”match”:1}]} inmsg=zxhr.responseText; //.split(‘</p>’)[0].split(‘>’)[eval(-1 + xhr.responseText.split(‘</p>’)[0].split(‘>’).length)]; if (inmsg.indexOf(‘”translatedText”:”‘) != -1) { if (inmsg.split(‘”translatedText”:”‘)[1].split(‘”‘)[0].indexOf(‘MYMEMORY WARNING’) == -1) { newblurbis=inmsg.split(‘”translatedText”:”‘)[1].split(‘”‘)[0]; if (sayintranet) { if (pretwois) { if (!pretwois.closed) { pretwois.close(); } } try { pretwois=window.open(‘http://localhost:8888/say.php?say=’ + encodeURIComponent(minusv + newblurbis), ‘_blank’, ‘left=650,top=250,width=400,height=400’); plusv=”; } catch (exc1) { } setTimeout(antipre,5000); if (plusv != ”) { try { pretwois=window.open(plusv, ‘_blank’, ‘left=650,top=250,width=400,height=400’); } catch (exc1) { } setTimeout(antipre,5000); } plusv=”; } } } //} } } } function atranslateit(awords, awurl) { zxhr = new XMLHttpRequest(); zxhr.open(‘get’, awurl, true);

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

Just Javascript Card Game Errors Tutorial

The optimism of yesterday’s Just Javascript Card Game Commentary Tutorial can be considered laudable, but a tad unrealistic. We all know people make mistakes, in bridge and 500 card games, perhaps most often, those being … incorrect bid not following suit … and today, we start including these interruptions into the Google Translate (and, perhaps, macOS say “audio”) “commentary” as part of the “workflow” you might encounter with these card games. We introduce (and amend) … function abl() { if (sayintranet) { try { pretwois=window.open(‘http://localhost:8888/say.php?say=’ + encodeURIComponent(flb.replace(/Player\ Player\ /g, ‘Player ‘).replace(/\([^)]*\)/g, ”).replace(/\[\]/g,”)), ‘_blank’, ‘left=150,top=250,width=400,height=400’); } catch (exc1) { } setTimeout(antipre,5000); } twois=window.open(‘//translate.google.com/?sl=auto&tl=en&text=’ + encodeURIComponent(flb.replace(/Player\ Player\ /g, ‘Player ‘).replace(/\([^)]*\)/g, ”).replace(/\[\]/g,”)) + ‘%0A&op=translate’, ‘_blank’, ‘left=100,top=200,width=500,height=500’); } function wrel(inideais) { var outideais=”; outideais=inideais; if (wordsare != ” && doaudio) { if (inideais.toLowerCase().indexOf(‘ follow suit ‘) != -1 || (delay == 0 && inideais.toLowerCase().replace(‘ncorrect’,’congratulations’).indexOf(‘congratulations’) != -1)) { flb=inideais.split(‘ Score’)[0]; if (delay == 0) { abl(); delay=1000; } else { setTimeout(abl, delay); } return inideais; } if (wordsare.indexOf(‘ trick ‘ + tricknumber + ‘ ‘) != -1 && inideais.toLowerCase().indexOf(‘ trick ‘ + tricknumber + ‘ ‘) != -1) { //if (inideais.toLowerCase().indexOf(‘congratulations’) != -1 && inideais.indexOf(‘(‘) != -1) { // outideais=inideais.replace(/\([^)]*\)/g, ”); //} if (wordsare.indexOf(outideais) == -1) { if (inideais.toLowerCase().indexOf(‘congratulations’) != -1) { //outideais=wordsare + ‘ and ‘ + outideais.split(‘(‘)[0]; outideais=outideais.split(‘(‘)[0].replace(/Player\ Player\ /g, ‘Player ‘) + ‘ after ‘ + wordsare + ‘ making trick scores ‘ + scoresuffix.replace(/\-/g,”).replace(/\.[^,]*/g,”).replace(/\,/g,’ ‘) + ‘ game score ‘ + scoresuffix.replace(/[0-9]*\./g, ”).replace(/\,/g,’ ‘) + ‘ and team scores ‘ + overallss.replace(‘,’,’ ‘); // + ‘ and ‘ + outideais.split(‘(‘)[0]; } else { outideais=wordsare + ‘ and ‘ + inideais; } wordsare=outideais; } else { wordsare=outideais; } if (inideais.toLowerCase().indexOf(‘congratulations’) != -1) { outideais=inideais; } } } delay=1000; return outideais; } … to help separate this from the “and” conjunction usage we used to help with the non-erroneous workflow “commentary” of yesterday’s work. To see these new “erroneous workflow” audio commentary parts in action, 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”

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

Just Javascript Card Game Commentary Tutorial

On top of the audio functionalities featured in the recent Just Javascript Card Game Intranet Tutorial we want to explore the possibilities for a new mode of use … 500 card game … like “04.0,Robert Metcalfe[rmetcalfe15@gmail.com;rmetcalfe41@gmail.com], RMet[rmetcalfe15@gmail.com], RM[rmetcalfe41@gmail.com], R.M[rmetcalfe41@gmail.com] ” entered (deliberate space at end) at first prompt … or 500bridge and 04.004.1 remote user setup except that, now, with these audio possibilities … the hoster of the card game … only … could click the “ear” emoji to start (and continue through “card games” we’re hoping, but need more testing) … meaning … the hoster, only, could either play their entire game from the web application or entirely from the email or SMS messages or a combination of both, the audio helping alert them of the need for action off the email or SMS messages from other players We think this might be an interesting nuance to this game design. We’ll see how far we get! To see these new “during course of play” audio commentary parts in action, 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 can affect the game remotely via email)! Previous relevant Just Javascript Card Game Intranet Tutorial is shown below. Augmenting yesterday’s Just Javascript Card Game Google Translate Tutorial where it said … audio form via Google Translate text to audio functionality (which it is up to the hoster to make happen themselves) That “which it is up to the hoster to make happen themselves” is a tad annoying for some users that would like this automatic. Well, we’ve used the technique before with our Mac OS X Text to English Speech Primer Tutorial (and remember it with PHP Zip functionality, and others, as well) a concept we cannot help comparing

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

Just Javascript Card Game Intranet Tutorial

Augmenting yesterday’s Just Javascript Card Game Google Translate Tutorial where it said … audio form via Google Translate text to audio functionality (which it is up to the hoster to make happen themselves) That “which it is up to the hoster to make happen themselves” is a tad annoying for some users that would like this automatic. Well, we’ve used the technique before with our Mac OS X Text to English Speech Primer Tutorial (and remember it with PHP Zip functionality, and others, as well) a concept we cannot help comparing with the idea of (office) “Intranet” ideas. You see, we combine with the rjmprogramming.com.au “Internet” work a combination of … PHP via exec … calling … MAMP PHP … our inhouse … say.php that integrates the wonderful … (Mac OS X (in days past) and) macOS (operating system) say command used by PHP via exec to make say.php command which is a brilliant “text to speech” command line tool … that serverside involvement circumventing those “no audio without a click” restrictions of your modern day web applications, quite often. In the past, we’ve checked for the existence of “say.php” in a MAMP document root folder, in macOS place … all a lot to expect … and so we need a suck it and see … if (wordsare != lwordsare) { lwordsare=wordsare; if (sayintranet) { try { pretwois=window.open(‘http://localhost:8888/say.php?say=’ + encodeURIComponent(wordsare), ‘_blank’, ‘left=150,top=150,width=400,height=400’); } catch (exc3) { } setTimeout(antipre,5000); } 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′); } … approach that … does no harm … but if useful can augment with audio the visuals of the Google Translate popups of yesterday’s work. Cute (for some), huh?! To see this augmented example of a “functional background button” in action, 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

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

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