Just Javascript Card Game Say My Memory Delimiters Tutorial
In yesterdayโs Just Javascript Card Game Say My Memory Tutorial we used comma delimitation a lot. But why is that? Well, we like the comma, though it could be some other โnot used in the contentโ character, (and sorry about the split infinitives) because it is so easy to turn โฆ
a comma delimited string into a โฆ
Javascript array via โฆ
var anaray=thatstring.split(',');
PHP array via โฆ
$anaray=explode(',', $thatstring);
โฆ in two different forms of usefulness in various situations. Perhaps a reason to not look down on those simple string variables you encounter, because they may be full of โdelimitation intelligenceโ!
And so we are at the end of day two of the โฆ
macOS say audio โฆ with โฆ
My Memory language translations
โฆ โlove inโ and we are getting there with code organization, and just need to test more and build up more of those language translation โdelimitedโ strings, and think of a way to try to handle languages that read right to left such as Arabic and Hebrew.
And so theโช say.php (latest) versus say.php---GETME (this) say.php---GETME (this) versus say.php--GETME (previous ... default) say.php---GETME (this) versus say.php-GETME say.php---GETME (this) versus say.php_GETME say.php (latest) versus say.php_GETME (oldest) changed say php PHP and MAMP interface to macOS say command brilliance helps out theโช cards_usefocus.html (latest) versus cards_usefocus.html------------------------------------------------GETME (this) cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------------------GETME (previous ... default) cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html------------------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) โdelimiterโ tweaked 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)!
Just Javascript Card Game Say My Memory Tutorial Just Javascript Card Game Say My Memory Delimiters Tutorial Just Javascript Card Game Language Tutorial Just Javascript Card Game Errors Tutorial Just Javascript Card Game Commentary Tutorial Just Javascript Card Game Intranet Tutorial Just Javascript Card Game Google Translate Tutorial Just Javascript Card Game Functional Background Buttons Tutorial Just Javascript Card Game Invalid Bids Tutorial Just Javascript Card Game Popup Alert Tutorial Just Javascript Card Game Suit Sort Tutorial Just Javascript Bridge Card Game Redouble Tutorial Just Javascript Bridge Card Game Primer Tutorial Just Javascript Five Hundred Card Game Early Complete Exit Tutorial Just Javascript Five Hundred Card Game Open Misรจre Progress Bar Tutorial Just Javascript Five Hundred Card Game Open Misรจre All Local Tutorial Just Javascript Five Hundred Card Game Open Misรจre Wording Tutorial Just Javascript Five Hundred Card Game Open Misรจre Tutorial Just Javascript Five Hundred Card Game Emoji Entities Tutorial Just Javascript Five Hundred Card Game Internationalization Tutorial Just Javascript Five Hundred Card Game Email Tutorial Just Javascript Five Hundred Card Game CC Tutorial Just Javascript Five Hundred Card Game Names Tutorial Just Javascript Five Hundred Card Game Rendering Timing Tutorial Just Javascript Five Hundred Card Game Continuous Scoring Tutorial Just Javascript Five Hundred Card Game Kitty Dropdown Tutorial Just Javascript Five Hundred Card Game Kitty Logic Tutorial Just Javascript Five Hundred Card Game Remote Kitty Tutorial Just Javascript Five Hundred Card Game Kitty Setup Tutorial Just Javascript Five Hundred Card Game Bidding Tutorial Just Javascript Five Hundred Card Game Order Tutorial Just Javascript Five Hundred Card Game Smaller Deck Tutorial Just Javascript Five Hundred Card Game Follow Suit Colour Coding Tutorial Just Javascript Five Hundred Card Game Follow Suit Tutorial Just Javascript Five Hundred Card Game Host Aesthetics Tutorial Just Javascript Five Hundred Card Game Email Buttons Tutorial Just Javascript Five Hundred Card Game By Correspondence Tutorial Just Javascript Five Hundred Card Game Joker Tutorial Just Javascript Five Hundred Card Game Tutorial
Previous relevant Just Javascript Card Game Say My Memory Tutorial is shown below.
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โช say.php (latest) versus say.php--GETME (this) say.php--GETME (this) versus say.php-GETME (previous ... default) say.php--GETME (this) versus say.php_GETME say.php (latest) versus say.php_GETME (oldest) 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.
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('//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); zxhr.onreadystatechange = showStuffT; zxhr.send(null); return awords; } function translateit(words) { var anotherone=-1; // "//api.mymemory.translated.net/get?q=" + encodeURIComponent(inwords) + "&langpair=" + nonen + "|en" // //api.mymemory.translated.net/get?q=yo%20trabajamos&langpair=es|en if (tlngcode != 'en') { //alert('tlngcode=' + tlngcode); for (var imn=0; imn<sayvoices.length; imn++) { if (sayvoices[imn].indexOf(';' + tlngcode + '_') != -1) { anotherone=imn; if (sayvoices[imn].toLowerCase().indexOf(';' + lngcode.toLowerCase()) != -1) { minusv='-v ' + sayvoices[imn].split(';')[0] + ' '; return minusv + atranslateit(words, '//api.mymemory.translated.net/get?q=' + encodeURIComponent(words) + '&langpair=' + 'en|' + tlngcode); } } } } if (anotherone != -1) { //alert(sayvoices[anotherone].split(';')[0]); minusv='-v ' + sayvoices[anotherone].split(';')[0] + ' '; return minusv + atranslateit(words, '//api.mymemory.translated.net/get?q=' + encodeURIComponent(words) + '&langpair=' + 'en|' + tlngcode); } return words; } function yourencodeURIComponent(incv) { if (card_game.toLowerCase() == 'bridge') { if (!in_bidding && !in_kitty && cbid.toLowerCase() != 'none') { if (cbid.indexOf('mis') != -1) { return encodeURIComponent(translateit('In your bridge card game with final bid ' + (cbid + ' by Player ' + cbidby + '').replace('None (by Player 1)','Pass').replace('None','Pass') + ' ' + incv.replace(/\[\]/g,''))); } else { return encodeURIComponent(translateit('In your bridge card game with final bid ' + (cbid.replace('n',' No Trump').replace('c',' Club').replace('d',' Diamond').replace('s',' Spade').replace('h',' Heart').replace('0',' No Trump') + 's by Player ' + cbidby + '').replace('None by Player 1','Pass').replace('None','Pass') + ' ' + incv.replace(/\[\]/g,''))); } } else { return encodeURIComponent(translateit('In your bridge card game ' + incv.replace(/\[\]/g,''))); } } else if (card_game.toLowerCase() == '500ish') { if (!in_bidding && !in_kitty && cbid.toLowerCase() != 'none') { if (cbid.indexOf('mis') != -1) { return encodeURIComponent(translateit('In your 500 card game with final bid ' + (cbid + ' by Player ' + cbidby + '').replace('None (by Player 1)','Pass').replace('None','Pass') + ' ' + incv.replace(/\[\]/g,''))); } else { return encodeURIComponent(translateit('In your 500 card game with final bid ' + (cbid.replace('n',' No Trump').replace('c',' Club').replace('d',' Diamond').replace('s',' Spade').replace('h',' Heart').replace('0',' No Trump') + 's by Player ' + cbidby + '').replace('None by Player 1','Pass').replace('None','Pass') + ' ' + incv.replace(/\[\]/g,''))); } } else { return encodeURIComponent(translateit('In your 500 card game ' + incv.replace(/\[\]/g,''))); } } return encodeURIComponent(translateit(incv.replace(/\[\]/g,''))); }
To see these new โlanguageโ audio commentary parts in action, try the new improved Bridge and 500 game functionality at theโช cards_usefocus.html (latest) versus cards_usefocus.html-----------------------------------------------GETME (this) cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------------GETME (previous ... default) cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-----------------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Errors Tutorial is shown below.
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('//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โช cards_usefocus.html (latest) versus cards_usefocus.html----------------------------------------------GETME (this) cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------------GETME (previous ... default) cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html----------------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Commentary Tutorial is shown below.
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 500 bridge and 04.0 04.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โช cards_usefocus.html (latest) versus cards_usefocus.html--------------------------------------------GETME (this) cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------------GETME (previous ... default) cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html--------------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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.
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('//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โช cards_usefocus.html (latest) versus cards_usefocus.html-------------------------------------------GETME (this) cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------------GETME (previous ... default) cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-------------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Google Translate Tutorial is shown below.
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; } 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'); } } } } if (notset == '') { return eval('' + cby); } return cby; }
To see this next example of a โfunctional background buttonโ in action, try the new improved Bridge and 500 game functionality at theโช cards_usefocus.html (latest) versus cards_usefocus.html------------------------------------------GETME (this) cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------------GETME (previous ... default) cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Functional Background Buttons Tutorial is shown below.
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=โ//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) + 'px ' + eval(0.8 * window.innerHeight) + 'px,' + eval(0.7 * window.innerWidth) + 'px ' + eval(0.8 * window.innerHeight) + 'px' + ' ;background-position:'); } else { defstyle=defstyle.replace(';background-position:', lastbs + ',' + 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:'); } } } if (lastbp == '' || 1 == 1) { defstyle=defstyle.replace(';background-image:', lastbp + ',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>', lastbi + (',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>', lastbi + (',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>', lastbi + (',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>', lastbi + (',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>', lastbi + (',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(//www.rjmprogramming.com.au' + backi + ')' + '; } </style>')); // + ' ' + owidth + ' ' + oheight } }
To see this first example of a โfunctional background buttonโ in action, try the new improved Bridge and 500 game functionality at theโช cards_usefocus.html (latest) versus cards_usefocus.html------------------------------------------GETME (this) cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------------GETME (previous ... default) cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html------------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Invalid Bids Tutorial is shown below.
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, others, turn) away ').replace('Bid (via SMS) away ', 'Bid (please, others, turn) away '); setTimeout(gmyalertmc, deftwo); } deftwo=200; } else { setTimeout(gmyalertmc, deftwo); deftwo=200; } }
To see these nuances in play, try the new improved Bridge and 500 game functionality at theโช cards_usefocus.html (latest) versus cards_usefocus.html-----------------------------------------GETME (this) cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------GETME (previous ... default) cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Popup Alert Tutorial is shown below.
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โช cards_usefocus.html (latest) versus cards_usefocus.html-----------------------------------------GETME (this) cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------------------------------GETME (previous ... default) cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-----------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Suit Sort Tutorial is shown below.
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โช cards_usefocus.html (latest) versus cards_usefocus.html----------------------------------------GETME (this) cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html---------------------------------------GETME (previous ... default) cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html----------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Bridge Card Game Redouble Tutorial is shown below.
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โช cards_usefocus.html (latest) versus cards_usefocus.html---------------------------------------GETME (this) cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html--------------------------------------GETME (previous ... default) cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html---------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Bridge Card Game Primer Tutorial is shown below.
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โช cards_usefocus.html (latest) versus cards_usefocus.html--------------------------------------GETME (this) cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-------------------------------------GETME (previous ... default) cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html--------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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 Five Hundred Card Game Early Complete Exit Tutorial is shown below.
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], 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; documenttitle=indt; if (card_game.toLowerCase() == '500ish') { if (card_game == '500ISH') { document.title='500 card game where winning bid is ' + (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, ' + ') + ')') >= 40 || 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='500 card game where winning bid is ' + (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='500 card game ... ' + scoresuffix + sss; } else { document.title='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; } }
In light of this, the scenario of todayโs tutorial picture may horrify some and amuse others, as the scenario of the worldโs shortest game of 500 โฆ
Player 1 bids 10n (ie. 10 no trumps)
Player 1 leads
Player 2 beats the lead
Player 3 cannot beat the card of Player 2 โฆ itโs all done and dusted โฆ but โฆ
Player 4 cannot beat the card of Player 2 โฆ seals the (bad) deal โฆ
Score becomes -0.520,1.0,0.0,0.0 (as reflected on emails sent to players) โฆ and โฆ
the 500 card game application sets the score to 0.0,0.0,0.0,0.0 (for internal use only) and overallss to 0,1 with an โas if from the startโ shuffling and dealing of new cards โฆ the โas ifโ in โas if from the startโ is pertinent โฆ nowadays a new game like this has Player 2 replace Player 1 as the โdealerโ (but Player 1 remains the โhostโ)
Still going as โJust Javascriptโ (ie. no โbodyโ element definition) try theโช cards_usefocus.html (latest) versus cards_usefocus.html-------------------------------------GETME (this) cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html------------------------------------GETME (previous ... default) cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-----------------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-------------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Open Misรจre Progress Bar Tutorial is shown below.
Just Javascript Five Hundred Card Game Open Misรจre Progress Bar Tutorial
Even with yesterdayโs Just Javascript Five Hundred Card Game Open Misรจre All Local Tutorial , it may not seem like it, but we have been beavering away keeping the 500 card game โstatus areaโ giving relevant information. Today we load it up even more as a dual purpose โฆ
background (svg) โrectโ element semi-transparent background to 500 card game status area progress bars for Player 1/3 scoring and Player 2/4 scoring โฆ displaying during the bidding and kitty phase of the game โฆ and then โฆ
background (svg) โrectโ element semi-transparent background to 500 card game status area progress bar for leading bid trick round scoring relative to final bid made โฆ displaying during card play phase of the game
โฆ as per (the multi-purpose) โฆ
function progressbar(inoutss) { var outss=inoutss; if (outss == '') { outss=scoresuffix; } var totball=0; var totnball=0; if (card_game == '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) == '6') { toget=6; tonget=4; } if (('' + cbid).substring(0,1) == '7') { toget=7; tonget=3; } if (('' + cbid).substring(0,1) == '8') { toget=8; tonget=2; } if (('' + cbid).substring(0,1) == '9') { toget=9; tonget=1; } if (('' + cbid).substring(0,2) == '10') { toget=10; tonget=0; } 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) { bbtextb=abbtextb.replace(" width='" + abbtextb.split(" width='")[1].split("'")[0] + "'", " width='0'"); //if (defstyle.indexOf(prevbb) == -1) { alert('Oops'); } defstyle=defstyle.replace(prevbb, bbtextb); } else { 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); } } else { if (eval('' + totnb) > eval('' + tonget)) { bbtextb=abbtextb.replace(" width='" + abbtextb.split(" width='")[1].split("'")[0] + "'", " width='0'"); //if (defstyle.indexOf(prevbb) == -1) { alert('OoPs'); } defstyle=defstyle.replace(prevbb, bbtextb); } else { 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); } } } 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] + '.0').split('.')[1])) + (eval(((ssallare[2].substring(0,1) == '-') ? '-' : '') + (ssallare[2] + '.0').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] + '.0').split('.')[1])) + (eval(((ssallare[3].substring(0,1) == '-') ? '-' : '') + (ssallare[3] + '.0').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; }
This mild form of animation is still โJust Javascriptโ (ie. no โbodyโ element definition) in theโช cards_usefocus.html (latest) versus cards_usefocus.html-----------------------------------GETME (this) cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html----------------------------------GETME (previous ... default) cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-----------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Open Misรจre All Local Tutorial is shown below.
Just Javascript Five Hundred Card Game Open Misรจre All Local Tutorial
You may be new to this โ500 card gameโ web application work of yesterdayโs Just Javascript Five Hundred Card Game Open Misรจre Wording Tutorial , in which case it may be that we need to reiterate information about the gameโs workings โฆ
game can be played by 4 players hovering around the same device โฆ non-remote or โAll Localโ (as in todayโs blog posting title) โฆ or โฆ
game can be played by a single hoster running this web application, hosting remote (via email or SMS) linked players and perhaps some โAll Localโ ones
As the project continues weโve found the logic of the first โAll Localโ mode lagging behind, because it is harder. Huh?! Well, it is harder because of the bother we need to take to try to allow players to hide their cards from other players, given some โlooking awayโ co-operation from the players when asked to. And so, just because in the last couple of days we made progress with Open Misรจre logic for remote player scenarios, alas, doesnโt mean weโve had the โAll Localโ equivalent logic working as well. Today we try evening up that score.
It was hard to take this code line being important in making that happen โฆ
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 + ' ').substring(0,3).toLowerCase() == (bids[ibidis] + ' ').substring(0,3).toLowerCase()) { isbid=true; gd=('' + dis); sentanswer=bids[ibidis] + ' '; console.log('4:sentclick()'); sentclick(); } }
โฆ we found via โconsole.logโ web inspector tracking down. We suspect, but did not research, that the reason โpasscntโ went weird for โAll Localโ scenarios was as a result of some setTimeout logic self-incrementing โpasscntโ programmatically, meaning the first pass bid (rather than the third, which is better) was setting off the Kitty logic ahead of time. Fixed now though!
The โsssโ variable emoji logic was also causing trouble for Open Misรจre status content fixed via โฆ
if (cbid.slice(-1).toLowerCase().replace('h','d') == 'd') { sss=' leading ' + cbidby + ' bid ' + cbid + ' ' + emojisuit() + ' '; } else { sss=' leading ' + cbidby + ' bid ' + cbid + ' ' + emojisuit(); } sss=sss.replace('è', String.fromCodePoint(232)).replace('open_', 'open ').replace('è', String.fromCodePoint(232)).replace('open_', 'open ');
With Open Misรจre in All Local mode of use logic we show all players the open hand in a Javascript alert popup window just before the winning bidder is displayed the Kitty Javascript prompt window, as per โฆ
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)) { 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.'); } 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),'');
In โAll Localโ mode of play, can bidding be ignored all together? Yes, backward compatibility is an important principle to try to preserve with ongoing functionalities, where possible, and reasonable.
Yet again, feel free to retry the improved 500 card game part of ourโช cards_usefocus.html (latest) versus cards_usefocus.html----------------------------------GETME (this) cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html---------------------------------GETME (previous ... default) cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html----------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Open Misรจre Wording Tutorial is shown below.
Just Javascript Five Hundred Card Game Open Misรจre Wording Tutorial
With our 500 card game web application of yesterdayโs Just Javascript Five Hundred Card Game Open Misรจre Tutorial the bidding of Misรจre and Open Misรจre bring an unusual dilemma to do with email communication. Even though we hate to confuse we need to weigh โฆ
the desire in Misรจre and Open Misรจre for the bidder to lose tricks (rather than the usual way the winning bidder wants to win tricks) โฆ against the use of โฆ
double negatives may cause confusion
โฆ and decide on the danger of a bit of โdouble negatives may cause confusionโ because we think most 500 card game players will get it as soon as they see the word โMisรจreโ mentioned, coupled with the awkward sentences used (where โsubjisโ is variable containing email subject content) โฆ
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; } 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)) { subjis='Sad news about ' + spare; } } subjis=subjis.replace('è', String.fromCodePoint(232)).replace('open_', 'open ').replace('è', String.fromCodePoint(232)).replace('open_', 'open ');
As well, we sort it out that โฆ
players can no longer see bidding buttons of irrelevance (bidding has already passed them by) on the emails
the open hand card links and buttons in the emails navigate nowhere (except when it is the open hand players turn to play a card)
Again, feel free to retry the improved 500 card game part of ourโช cards_usefocus.html (latest) versus cards_usefocus.html---------------------------------GETME (this) cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME (previous ... default) cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Open Misรจre Tutorial is shown below.
Just Javascript Five Hundred Card Game Open Misรจre Tutorial
The 500 card game of yesterdayโs Just Javascript Five Hundred Card Game Emoji Entities Tutorial , and incarnation before it, hid from the players the chance to bid โฆ
Open Misรจre
โฆ but we want to remedy this because โฆ
it is a fun โout thereโ addition to the 500 card game
it can win the game there and then, worth 500 points to that player pairing that lose all ten tricks with the partner of the winning bidder openly displaying their cards to all players, and played by the winning bidder
the bits and pieces to achieve this programmatically are there โฆ
โฆ but, we are going to take this on gradually, our part one, today, fixing a couple of issues with remote email players using the PHP mail method, those being โฆ
add Open Misรจre successful bidderโs partnerโs cards in a second table โฆ
if ((!in_bidding || in_kitty) && eval('' + omc) >= 0) { if (('' + hsuffs[eval(-1 + omc)]).replace('null','').indexOf('<table') != -1 && eval('' + curplayer) != eval('' + omc)) { 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' + hsuffs[eval(-1 + omc)].split('<table')[1].split('</table>')[0].replace(/\<tr\ id\=/g, '<tr style=display:none; id=').replace(/SUBMIT/g,'button').replace(/submit/g,'button').replace(/\ href\=/g,' data-href=') + '</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)) + ' ... ' + zsuffs[eval(-1 + omc)] + '</p></body>'); } }
โฆ within the Inline HTML email to other player emails โฆ and โฆ
when it is the time for the Open Misรจre successful bidderโs partner to play their card, their email is BCCโed to the Open Misรจre successful bidderโs email address
Feel free to retry the improved 500 card game part of ourโช cards_usefocus.html (latest) versus cards_usefocus.html---------------------------------GETME (this) cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------------------------------GETME (previous ... default) cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html---------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Emoji Entities Tutorial is shown below.
Just Javascript Five Hundred Card Game Emoji Entities Tutorial
We happened to open up a new email client application to the remote 500 card player emails of yesterdayโs Just Javascript Five Hundred Card Game Internationalization Tutorial and, at least for our macOS Mail app, the suit and card emojis came up as gobbledegook in the body Inline HTML section of the the emails.
This discovery, though offputting, also lead, by a few minutes ago (writing this blog post), to a two-pronged improvement to our 500 card game web application as per โฆ
the lack of clarity saw us relying (on our non-mobile aspect to viewing) the HTML element title (hover over see blurb) content, and realizing that a full player card list as a title on their name textbox would be just peachy โฆ
var wsuffs=[]; 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; } // Example call codeline ... 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])); // Example of use piecing together remote 500 card player email ... 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 + '.11')[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>');
the trial of one of the alternative emoji display mechanisms that isnโt String.fromCodePoint([HTML-decimal-entity]) ( ie. &#[HTML-decimal-entity]; ) โฆ eg. Spades โ String.fromCodePoint(9824); alternative would be ♠ โฆ had us, amongst a few things, change โฆ
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 ''; }
โฆ all fine and good, now, for macOS Mail app (email client), but, more importantly, it did not break with any of the previously working mail applications, making these changes. Yay!!!!!
So please retry the improved 500 card game part of ourโช cards_usefocus.html (latest) versus cards_usefocus.html--------------------------------GETME (this) cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-------------------------------GETME (previous ... default) cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html--------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Internationalization Tutorial is shown below.
Just Javascript Five Hundred Card Game Internationalization Tutorial
Continuing themes from yesterdayโs Just Javascript Five Hundred Card Game Email Tutorial weโve been shoring up aspects to the user experience for our 500 card game web application via โฆ
internationalization focus on increased use of โฆ
emojis (eg. suit emojis within Inline HTML Emails)
โฆ and along the way discovered flaws in our โfollow the same suit as leading cardโ logic, now centred around โฆ
function threetoone(threeis) { var suitis=('' + threeis).slice(-1).toLowerCase() ; var crdis=('' + threeis).substring(0,2); if (crdis == '11' && trumpsare != '0') { 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 maybeno(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() == '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; }
โฆ as well as non-mobile users being able to hover over bidding buttons to discover what their team scores with that bid, and the background image text up the top left mentioning โBidโ during any bidding phase and โClick (via email) away โฆโ or โClick (via SMS) away โฆโ for remote players, back for the hosterโs web application window, during the โplaying out of the tricksโ phase of the 500 card game, hopefully establishing a means by which the hoster can know what is, or is not and should be, going on with the hosterโs 500 card game, and so enabling informed email communication to get the games back on the rails, perhaps.
Please retry the improved 500 card game part of ourโช cards_usefocus.html (latest) versus cards_usefocus.html-------------------------------GETME (this) cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html------------------------------GETME (previous ... default) cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Email Tutorial is shown below.
Just Javascript Five Hundred Card Game Email Tutorial
In a blog post some time before yesterdayโs Just Javascript Five Hundred Card Game CC Tutorial we talked of โorderโ when we presented Just Javascript Five Hundred Card Game Order Tutorial . Donโt know about you, but I find the combination of โฆ
โฆ based Inline HTML in an email, asking for interactive input, โorderlyโ.
Probably we normally think of data to append to an established โtableโ element via the addition of a new row (โtrโ element) or cell (within a row via a โtdโ or โthโ element). Within a โtableโ element though, you can think of โpartitionsโ in the form of โฆ
โฆ which have that synergy with a webpageโs โheadโ and โbodyโ elements, the theme of the current blog posting thread being to do away with the need for a โbodyโ element (except for our Inline HTML Emails (which canโt really do anything much without their โbodyโ elements )).
We do a bit of uppercase/lowercase work with the end of โtheadโ element (ie. </THEAD>) to leave our email Inline HTML โtableโ โtheadโ elements blank for โฆ
500 card game โbiddingโ emails โฆ and for โฆ
500 card game โkitty/biddingโ emails
โฆ but then start to fill in the โtheadโ element for the โplaying out of the tricksโ emails, adding todayโs work, better card game status information, added to the top of the tabular information presented. Rather than fret about adding to the top, we just slot into the unallocated โtheadโ slot, for these scenarios, as per โฆ
function tabord(indivhtml) { var ilook=0, jlook=1, klook=0, cbidfound='SUBMIT', tdyellow=''; var slookfor=[' data-suit=s', ' data-suit=c', ' data-suit=d', ' data-suit=h']; 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 (in_kitty) { console.log('tds_kitty=' + tds_kitty); outdivhtml=outdivhtml.replace('</tbody>', tds_kitty + '</tbody>'); //.replace('</thead>','</THEAD>'); outdivhtml=outdivhtml.replace('</tbody>', '<tr><td>Bidding<br>Your Current Bid: None<td><input type=' + cbidfound + ' name=myanswer value="pass "></input></td></TR></tbody>'); } else { outdivhtml=outdivhtml.replace('</tbody>', '<tr><td>Bidding<br>Current Bid: None<td><input type=' + cbidfound + ' name=myanswer value="pass "></input></td></TR></tbody>'); } if (cbid.toLowerCase().trim().replace('pass','none').replace('none','') != '') { cbidfound='button'; } twentythree--; twentythree--; for (klook=0; klook<bids.length; klook++) { if (bids[klook].toLowerCase().trim() == cbid.toLowerCase().trim()) { tdyellow=' title="Current leading bid by Player ' + cbidby + '" class=isyellow'; } if (bids[klook].indexOf('open') == 0) { outdivhtml=outdivhtml.replace('</TR>', '<td' + tdyellow + '><input style=display:none; type=' + cbidfound + ' name=myanswer value=' + bids[klook] + '></input></td></TR>'); } else { outdivhtml=outdivhtml.replace('</TR>', '<td' + tdyellow + '><input type=' + cbidfound + ' name=myanswer value="' + bids[klook] + ' "></input></td></TR>'); } if (bids[klook].toLowerCase().trim() == cbid.toLowerCase().trim()) { cbidfound='SUBMIT'; } 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 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++) { 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; return outdivhtml.replace('<thead></thead>', '<thead><td colspan=' + twentythree + '>500 Card Game Player' + eval('' + curplayer) + ' Name: <input 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) ... ' + wemstuff.replace(/\-\ \ /g, '- <font color=red>').replace(/\ \ /g, '</font>') + '</td></tr></thead>') ; }
You may have noticed with yesterdayโs work, improvements to the email subject lines during the 500 card game โplaying of the tricksโ phase, but there are two good reasons to prefer to (additionally) do this in the email body sectionโs Inline HTML. There, you can โฆ
change heart and diamond suit emojis to red within โฆ <font color=red></font>
web browser zooming in combination with a webmail browser based email client can have you zooming in and improving the visibility of the card and suit emojis
Please retry the tweaked 500 card game part of ourโช cards_usefocus.html (latest) versus cards_usefocus.html------------------------------GETME (this) cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME (previous ... default) cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game CC Tutorial is shown below.
Just Javascript Five Hundred Card Game CC Tutorial
On top of yesterdayโs Just Javascript Five Hundred Card Game Names Tutorial โnames for numbersโ work, today we have two themes to the work โฆ
shore up that offer on the โ500 card gameโ first Javascript prompt window to enter email/SMS addresses/numbers straight away, meaning no more Javascript prompt windows appear until the end of the game if players follow suit โฆ and โฆ
should the host of the โ500 card gameโ wait to enter email/SMS addresses/numbers later they can then enter comma separated email/SMS address/number lists which get recognised as any 3 combinations of โฆ
email address (and you can specify a name for those all lowercase PHP mail Inline HTML Email scenarios) and mixed case for mailto: emails for the To: recipient
email address for a CC: recipient (mixed case for mailto: emails)
email address for a BCC: recipient (mixed case for mailto: emails)
SMS number
โฆ which we facilitated among the changed โfes()โ function we show below, along with its buddies โฆ
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]); 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('500 Card Game Player', '500 Card Game Player '); } return ines; } 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 prevcsuff=''; var sc=''; var hjg=''; var ipl=0, jpl=0; var coms=ines.split(','); if (eval('' + coms.length) > 1) { 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) { ccnames[eval('' + nines)]=fesh(coms[jpl]); } else { bccnames[eval('' + nines)]=fesh(coms[jpl]); } } return ines; } 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); 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); 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); document.head.innerHTML+=bpmore(defstyle); } return ines; } 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 + ']'; } return ines; } 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 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)]; 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)]; 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)]; 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)]; return defstyle.replace(dfrom, dto); } else if (defstyle.indexOf(dfrom) != -1) { return defstyle.replace(dfrom, dto); } return defstyle.replace(dfrom, dto); }
Try the tweaked 500 card game part of ourโช cards_usefocus.html (latest) versus cards_usefocus.html------------------------------GETME (this) cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----------------------------GETME (previous ... default) cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html------------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Names Tutorial is shown below.
Just Javascript Five Hundred Card Game Names Tutorial
Onto yesterdayโs Just Javascript Five Hundred Card Game Rendering Timing Tutorial , being our web application is now dealing with collaboration and teams, wouldnโt it be good to provide a mechanism to turn those boring โฆ
Player 1,Player 2,Player 3,Player 4
โฆ number feeling default labels for players be able to be turned into names? We accept, now, email definitions such as โฆ
Robert James Metcalfe[rmetcalfe15@gmail.com]
โฆ to facilitate this additional user experience improvement.
It needed all these new Javascript called functions โฆ
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; 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 + ' ').substring(0,1) < '0' || ('' + yhisp + ' ').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]; } } return outes.replace('500 Card Game Player', '500 Card Game Player '); } return ines; } 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 fes(ines, nines) { // strip Name Of[email@at] to email@at var prevcsuff=''; var hjg=''; var ipl=0; var nameas=ines.split('['); if (eval('' + nameas.length) == 2) { if (nameas[1].indexOf(']') != -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); 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); 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); document.head.innerHTML+=bpmore(defstyle); } return ines; } 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 + ']'; } return ines; } function defstylereplace(dfrom, dto) { if (defstyle.indexOf(dfrom) != -1) { return defstyle.replace(dfrom, dto); } else if (defstyle.indexOf(' leading ') != -1) { dfrom=' ' + defstyle.split(' leading ')[0].split(' ')[eval(-1 + defstyle.split(' leading ')[0].split(' ').length)]; 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)]; return defstyle.replace(dfrom, dto); } return defstyle.replace(dfrom, dto); }
โฆ to take this first draft of changes to make this naming functionality happen.
We hope you utilize the improved naming functionality with the 500 card game part of Just Javascript Five Hundred Card Game Continuous Scoring Tutorial with ourโช cards_usefocus.html (latest) versus cards_usefocus.html-----------------------------GETME (this) cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html----------------------------GETME (previous ... default) cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html---------------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-----------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Rendering Timing Tutorial is shown below.
Just Javascript Five Hundred Card Game Rendering Timing Tutorial
Every now and then, and usually involving the timing of a Javascript prompt or confirm or alert popup window, we are caught out by that tiny snippet of time it takes the web browser to complete a rendering task. If that rendering task has not completed ahead of the modal Javascript popup windows it is not always โmission criticalโ unworkable for the user, as with our current project where we have put up with the annoyance for more than a week now. The scenario of the issue is โฆ
In the 500 card game (with all players non-remote (ie. presumably all using the one device)) on, say, Player 1, clicking their first card, and in the interests of allowing players to only see their own cards, before our fix, the prompt window prompting Player 2 to tell others to turn away because the next prompt window display Player 2 cards, that Player 1 click turn over of card webpage rendering had not finished.
โฆ but better would it be if it was, because then Player 1 involvement would be done and dusted, and would not be a concern going forward with Player 2 activities.
Believe it or not, on occasions all that is needed here to address this annoyance is a fifth of a second of delay, as per โฆ
var passcnt=0; var gwh=''; function myalertmc(wh) { // new myalertmc() function ... gwh=wh; if (passcnt != 0) { gmyalertmc(); // ... sometimes if okay without delay ... } else { setTimeout(gmyalertmc, 200); // ... but sometimes a very short delay is enough time for webpage rendering to complete ... } } function gmyalertmc() { // (wh) ... mainly just the old myalertmc() function ... var wh=''; if (gwh != '') { wh=gwh; gwh=''; } // Rest of old myalertmc() function code follows, where a Javascript prompt popup window happens ... }
We hope you can see an improvement on yesterdayโs Just Javascript Five Hundred Card Game Continuous Scoring Tutorial with ourโช cards_usefocus.html (latest) versus cards_usefocus.html----------------------------GETME (this) cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html---------------------------GETME (previous ... default) cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html--------------------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html-------------------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html----------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Continuous Scoring Tutorial is shown below.
Just Javascript Five Hundred Card Game Continuous Scoring Tutorial
Up until yesterdayโs Just Javascript Five Hundred Card Game Kitty Dropdown Tutorial any โ500 card gameโ web application work was self contained within a single execution of a single web page. But with a 4 player 500 card game, it is usually the case that a game spans several shuffle and deal sets of 10 trick โplaysโ for a couple of players to reach the 500 or -500 score that determines a winner of that game.
And so it comes to scoring logic today, and a โget argumentsโ arrangement (via ? and & arguments) to carry on the game โฆ
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 jscores=[0,0,0,0]; var scoresuffix=''; function documenttitleeq(indt) { documenttitle=indt; if (card_game.toLowerCase() == '500ish') { if (card_game == '500ISH') { document.title='500 card game where winning bid is ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass').replace('1','1,III').replace('2','2,IV').replace('3','3,1').replace('4','4,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, ' + ') + ')') >= 40) { if (eval('' + totcpp) > 0) { totcpp=-totcpp; var llj=sfhz(false); if (confirm('Thanks for playing the 500 card game ... ' + scoresuffix + sss + ' ... OK to play again?')) { location.href=llj; //lurl(); } } } } else { if (cbid.replace('None', '') != '') { document.title='500 card game where winning bid is ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass').replace('1','1,III').replace('2','2,IV').replace('3','3,1').replace('4','4,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='500 card game ... ' + scoresuffix + sss; } else { document.title='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 sfhz(torf) { var om=''; var psx=scoresuffix; var jkscores=scoresuffix.split(','); var iyt=0, lurldone=false; var tscores=[]; for (iyt=0; iyt<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<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('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); document.head.innerHTML+=bpmore(defstyle); } else { if (eval(tscores[1] + tscores[3]) >= 6) { jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); 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('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); document.head.innerHTML+=bpmore(defstyle); } else { if (eval(tscores[1] + tscores[3]) >= 7) { jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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))])); 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('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); document.head.innerHTML+=bpmore(defstyle); } else { if (eval(tscores[1] + tscores[3]) >= 8) { jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); 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('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); document.head.innerHTML+=bpmore(defstyle); } else { if (eval(tscores[1] + tscores[3]) >= 9) { jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); 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('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); document.head.innerHTML+=bpmore(defstyle); } else { if (eval(tscores[1] + tscores[3]) >= 10) { jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); 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('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); document.head.innerHTML+=bpmore(defstyle); } else { if (eval(tscores[1] + tscores[3]) == 0) { jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]); } else { jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<'); 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 == '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; } // code snippet for score changing uses code above as per ... 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]); }
And so, please join us on our โ500 card gameโ (almost there) non-hybrid journey with ourโช cards_usefocus.html (latest) versus cards_usefocus.html--------------------------GETME (this) cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html-------------------------GETME (previous ... default) cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html------------------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html--------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Kitty Dropdown Tutorial is shown below.
Just Javascript Five Hundred Card Game Kitty Dropdown Tutorial
As mentioned with yesterdayโs Just Javascript Five Hundred Card Game Kitty Logic Tutorial , today is an aesthetics day regarding dropdown option colours (not so flexible) and emojis (a tiny bit better). Okay, so the card emojis have no inherent colour, but we had mixed success researching a red diamond (yes) and a red heart (no) suit emoji โrednessโ solution.
Also, we restricted some bidding button email click options by turning input type=submit into input type=button (ie. no navigation but looks the same) for bids that become too low to be valid in the context of the 500 card game.
So please join us on our โ500 card gameโ (getting ever closer to a) non-hybrid journey with ourโช cards_usefocus.html (latest) versus cards_usefocus.html-------------------------GETME (this) cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html------------------------GETME (previous ... default) cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html-----------------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Kitty Logic Tutorial is shown below.
Just Javascript Five Hundred Card Game Kitty Logic Tutorial
Adding to yesterdayโs Just Javascript Five Hundred Card Game Remote Kitty Tutorial weโve concluded โฆ
Thereโs got to be some logic to what Kitty does?
โฆ surely?!
And so we want to see if there are some aesthetic improvements (and user experience improvements restricting some poor button presses) to the emails, for tomorrowโs work, containing those dropdowns within the โฆ
remote player kitty logic โฆ and distinct from todayโs push to resolve โฆ
non-remote player kitty logic
โฆ involving that twin bidding/kitty Javascript prompt window ask after three pass answers from bidding players.
Please join us on our โ500 card gameโ (getting ever closer to a) non-hybrid journey with ourโช cards_usefocus.html (latest) versus cards_usefocus.html------------------------GETME (this) cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html-----------------------GETME (previous ... default) cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html----------------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html------------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Remote Kitty Tutorial is shown below.
Just Javascript Five Hundred Card Game Remote Kitty Tutorial
On top of yesterdayโs Just Javascript Five Hundred Card Game Kitty Setup Tutorial , today weโve been concentrating on the scenario of remote email players and the winning bidder working the kitty.
Then, it occurred to us during this, that where we said yesterday โฆ
where you may discern that the trigger to move on is 4 โpassโ bids in a row
โฆ that in so doing we were adding an unnecessary ask (perhaps) into the โequationโ of how the โ500 card gameโ operates, in that on the third โpassโ bid we get back to the last successful bidder anyway, so why not offer them the chance to do either โฆ
define their kitty swaps (as they won the bidding), and then click on their opening card placement for the first card of the first trick โฆ or, we could not remember exactly the rules, but โฆ
also allow them to up their own last bid (and then we thought maybe this was feasible, then it opens the door to other players re-entering the โbidding frayโ as the opposition argument to thinking this sounds unfair) by clicking a higher ranked bidding submit button
โฆ and this was our main design issue for the day, leaving non-remote scenarios for tomorrow.
And so, if you join us on our โ500 card gameโ (getting towards) non-hybrid journey with ourโช cards_usefocus.html (latest) versus cards_usefocus.html-----------------------GETME (this) cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html----------------------GETME (previous ... default) cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html---------------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-----------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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), just be aware that a kitty for a non-remote player you swap cards via will not be enacted for a day or so. 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)!
Previous relevant Just Javascript Five Hundred Card Game Kitty Setup Tutorial is shown below.
Just Javascript Five Hundred Card Game Kitty Setup Tutorial
Operation โKitty Hawkโ proceeds today on top of the bidding work of yesterdayโs Just Javascript Five Hundred Card Game Bidding Tutorial . Itโs just that โฆ well โฆ itโs a bit more involved and we only got to the Kitty bit, not the Hawk bit, today.
Tomorrow we should be โtaking offโ regarding having a kitty (of 3 cards, optionally swappable for others in the winning bidders hand, in a game of 500 played by 4 players).
Weโve plumped for an extra โKittyโ table row be added to a remote email playerโs first โplaying of cardsโ email whereby they both โฆ
make their optional kitty swapping moves via new dropdowns โฆ
for (ixc=0; ixc<hands.length; ixc++) { bdl=hands[ixc].split(' '); // used in "Other code goes here" if (eval('' + ixc) >= 40) { eis=0; //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]); } } //alert(String.fromCodePoint(eis) + ' threeis=' + threeis + 'zsuffs[]=' + zsuffs[eval(-1 + curplayer)]); if (tds_kitty == '') { tds_kitty='<tr><td>Kitty</td><td><select name=swap1><option value="">Kitty Card 1 ' + String.fromCodePoint(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)) + '">' + zsuffs[eval(-1 + curplayer)].trim().split(' ')[eval('' + ihjk)] + '</option></SELECT>'); } tds_kitty=tds_kitty.replace('</SELECT>','</select>'); } else { tlen=eval(-1 + eval('' + tds_kitty.split('</td>').length)); //alert('tlen=' + tlen + ' ' + tds_kitty + ' ' + zsuffs[eval(-1 + curplayer)].trim().split(' ').length); tds_kitty=tds_kitty.replace('</td></TR>','</td><td><select name=swap' + tlen + '><option value="">Kitty Card ' + tlen + ' ' + String.fromCodePoint(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)) + '">' + zsuffs[eval(-1 + curplayer)].trim().split(' ')[eval('' + ihjk)] + '</option></SELECT>'); } tds_kitty=tds_kitty.replace('</SELECT>','</select>'); } } // Other code goes here } tds_kitty=tds_kitty.replace('</td></TR>','</td><td colspan=' + thirty + '></td></tr>');
โฆ (whose data navigates with the form (via defined โnameโ properties), and tomorrow, too, weโll turn off the card โaโ links on kitty scenarios, because we want you to navigate via the email inline HTML form rather than โaโ href navigation) โฆ as well as, the usual โฆ
click for (the first) card to be played (in this first trick)
And so today the navigation out from this is achieved and tomorrow we have to cater for โKitty Hawkโ getting down again โฆ
Hawk โฆ let Kitty down now, thatโs a good bird of prey!
If you join us on our โ500 card gameโ (getting towards) non-hybrid journey with ourโช cards_usefocus.html (latest) versus cards_usefocus.html----------------------GETME (this) cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html---------------------GETME (previous ... default) cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html--------------------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html----------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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), just be aware that a kitty you swap cards via will not be enacted for a day or so. 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)!
Previous relevant Just Javascript Five Hundred Card Game Bidding Tutorial is shown below.
Just Javascript Five Hundred Card Game Bidding Tutorial
Moving on from yesterdayโs Just Javascript Five Hundred Card Game Order Tutorial we start out on our โ500 card gameโ bidding phase made up of โฆ
pitting the four players against each other for the highest bid in amongst โฆ
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"];
โฆ the โopen_misรจreโ a job for another day
winner of bidding swaps three cards, out, for the three cards of the kitty, in
โฆ and we are concentrating on the first part today. This bidding for the โ04.0โ scenario still needs to hide cards from other players โฆ doh! As such, it is a whole layer of code (while variable in_bidding is true) on top of a hybrid 500 card game modus operandi. Funnily enough, even for non-email participants we converge on the email button press code in function sentclick (to arrive at, within that function) where you may discern that the trigger to move on is 4 โpassโ bids in a row โฆ
if (in_bidding) { ma=sentanswer; //alert('sent ma=' + ma); if (ma.toLowerCase().indexOf('pass') == 0) { passcnt++; if (passcnt == 4) { in_bidding=false; curplayer=eval('' + cbidby); lastwinner=eval('' + cbidby); donelistis=',1,2,3,4,'; if (cbid.trim().slice(-1).toLowerCase() == 'n' || cbid.toLowerCase().indexOf('mis') != -1) { trumpsare='0'; } else { trumpsare=cbid.trim().slice(-1).toLowerCase(); } 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); 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]); } } } } } if (eval('' + emailsms.length) >= eval('' + curplayer)) { //alert('7'); if (('' + emailsms[eval('' + curplayer)]).trim() != '') { //alert('8'); remote=true; retcom(msuffs[eval(-1 + bidplayer)], rsuffs[eval(-1 + bidplayer)]); } } //alert('9'); if (1 == 1) { if (!remote) { myalertmc('Player ' + curplayer + ' cards are ... ' + 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; retcom(msuffs[eval(-1 + bidplayer)], rsuffs[eval(-1 + bidplayer)]); } } //alert('9'); if (1 == 1) { if (!remote) { myalertmc('Player ' + curplayer + ' cards are ... ' + zsuffs[eval(-1 + curplayer)]); } } } } else { 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()) { //alert('found bid ' + bids[ibidis]); thisbidrank=ibidis; if (eval('' + thisbidrank) > eval('' + cbidrank)) { //alert('found relevant bid ' + bids[ibidis]); cbid=bids[ibidis]; //alert('1'); cbidby=eval('' + bidplayer); //alert('2'); 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; retcom(msuffs[eval(-1 + bidplayer)], rsuffs[eval(-1 + bidplayer)]); } } //alert('9'); if (1 == 1) { if (!remote) { myalertmc('Player ' + curplayer + ' cards are ... ' + zsuffs[eval(-1 + curplayer)]); } } } } } } }
And so, again, join us on our โ500 card gameโ (getting towards) non-hybrid journey with ourโช cards_usefocus.html (latest) versus cards_usefocus.html---------------------GETME (this) cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html--------------------GETME (previous ... default) cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html-------------------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html---------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Order Tutorial is shown below.
Just Javascript Five Hundred Card Game Order Tutorial
Many humans get comfort from โorderโ. โOrderโ means many things to many people. Our recent โcolour codingโ forays developing our current โ500 card gameโ are our expressions of โorderโ.
If you actually play 500 with cards dealt to four players (one of them you) in two teams of two it will be interesting to see how each player re-organizes, or not, the ten cards they are dealt. Personally, I break into suit groups and even within those groups I sort (curiously for bridge card game rules, quite often), and later I might try to put right bowers into appropriate rearranged suits depending on what trumps ends up being after the bidding finishes.
We want to do something similar (but no โwithin suit sortingโ), hoping that expression of โorderโ is a better presentation for our online players too?! The fact that the [playerNumer].[cardNumber]โs become disordered is the price (we have decided) to pay, but we think the users will see how these just represent an expression of a tailored โback of the cardโ look, and get used to this, but relax a bit with the game as โorderโ increases.
And so onto yesterdayโs Just Javascript Five Hundred Card Game Smaller Deck Tutorial we add to a remote email users presentation the redisplay of data into an HTML table with four rows corresponding to the card suits the players cards fall into.
function tabord(indivhtml) { var ilook=0, jlook=1; var slookfor=[' data-suit=c', ' data-suit=d', ' data-suit=h', ' data-suit=s']; var slooks=[]; var outdivhtml='<br><table border=2><thead></thead><tbody></tbody></table>' for (ilook=0; ilook<slookfor.length; ilook++) { slooks=(indivhtml + ' <input ').split(slookfor[ilook]); twentythree=24; 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++) { 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); return outdivhtml; }
Again, join us on our โ500 card gameโ (getting towards) non-hybrid journey with ourโช cards_usefocus.html (latest) versus cards_usefocus.html--------------------GETME (this) cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html-------------------GETME (previous ... default) cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html------------------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html--------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Smaller Deck Tutorial is shown below.
Just Javascript Five Hundred Card Game Smaller Deck Tutorial
โIn betweenโ, as a phrase, resonates with me regarding computer programming. To me, programming sits between โฆ
the complexity of human communication and reaction (at the impossible side of the ledger) โฆ and โฆ
static model (at the โnot enough ambitionโ side of the ledger) of a human scenario you are writing a program (or tool) for
To do better than that โstatic modelโ above might rely on user acceptance testing by groups of real humans, hopefully with as much diversity as possible. Perhaps, open feedback, is an alternative way there.
Our โhybridโ โ500 card gameโ functionality has been gradually climbing up the scale above, but to jump to a non-hybrid โ500 card gameโ involving โฆ
not all cards of deck used
bidding (but further up the scale would add โbettingโ (which we will not do, though who knows what is possible with the email and SMS functionalities) )
kitty
bidding winner leading, rather than Player 1 (nesessarily)
two opposite hands Vs other two opposite hands
more nuanced scoring
misรจre scenarios (where non-participating player cards might be shown to the rest)
finesse (during play)
โฆ is quite a big job, and today (after yesterdayโs Just Javascript Five Hundred Card Game Follow Suit Colour Coding Tutorial ) we creep onto the big job from that โdisplay affectingโ โnot all cards of deck usedโ small job. How first to allow the host specify thet the โ500 card gameโ is non-hybrid โฆ
var nominal_numplayers = (document.URL.replace('?','&').indexOf('&card') != -1) ? prompt('How many players are playing your ' + 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. Memories with cross colour match limitation) prefix answer by + and if Any Colour (ie. Memories with a same colour lack of limitation) prefix answer by -) and suffix by .0 for hybrid 500 card game (or use 04.0 to play 4 players in two teams with bidding version and optionally comma delimit by a list of email/SMS addresses/numbers, else we can show you cards via "turn away" popup windows, and if you want players not to have to follow suit involve a space character somewhere)?', '2') : null;
The smaller deck coding biggest step? Redefining the โspcpsโ and โcardsโ arrays, when we detect a โ04.0โ scenario above, cutting out 2โs and 3โs and red 4โs, is the start you then code around with a โsuck it and seeโ (approach) aided by a web browser web inspector, is how we approached the start of our long journey.
Please join us on our โ500 card gameโ non-hybrid journey with ourโช cards_usefocus.html (latest) versus cards_usefocus.html-------------------GETME (this) cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html------------------GETME (previous ... default) cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html-----------------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Follow Suit Colour Coding Tutorial is shown below.
Just Javascript Five Hundred Card Game Follow Suit Colour Coding Tutorial
Onto yesterdayโs Just Javascript Five Hundred Card Game Follow Suit Tutorial as far as remote email players of the hybrid โ500 card gameโ go we come at improving the user experience, today, from two different colour coding ideas โฆ
within the inline HTML email sent to remote โ500 card gameโ players start colouring heart and diamond card emojis red via โฆ
<font color=red>&#[heartOrDiamondEmojiCodePoint];</font>
within the inline HTML email sent to remote โ500 card gameโ players start colour coding the buttons preceding the card emojis into five categories as per โฆ
lightgreen background if the same suit as the current trickโs lead card
lightgreen background with yellow border if the same suit as the trick lead card, and is trumps
yellow background if card suit is trumps
normal background for otherwise clickable cards dealt out to current user
missing card emoji if that card already played in this โ500 card gameโ incarnation
โฆ encouraging the following of suit for such remote users, and adding that clarity to help avoid some confusion playing the game (as a remote user sees none of the context the host or dealer of the โ500 card gameโ sees), and keeping it flowing without the host and dealer doling out any โdid not follow suitโ return email warnings that hold up the game.
All this colour coding is appearing within the (inline HTML) body section of the email. The subject section relies on the inherent colour of the emoji card, and that, up to this point of time, even for hearts and diamonds, is black.
So, yet again, to see these nuances in action try hosting a (hybrid) โ500 card gameโ of your own with ourโช cards_usefocus.html (latest) versus cards_usefocus.html------------------GETME (this) cards_usefocus.html------------------GETME (this) versus cards_usefocus.html-----------------GETME (previous ... default) cards_usefocus.html------------------GETME (this) versus cards_usefocus.html----------------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html------------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Follow Suit Tutorial is shown below.
Just Javascript Five Hundred Card Game Follow Suit Tutorial
For todayโs work progressing yesterdayโs Just Javascript Five Hundred Card Game Host Aesthetics Tutorial we had as an email to oneself โฆ
Fwd: Click away wider, documenttitle global variable, Know when 500 game ends, and add hybrid 500 card game in document.title
โฆ the incidentals for today on top of the planned โenforcing follow suitโ work from a few days ago.
Writing โchoresโ down ahead of a day is, of course, highly recommended, as the brain can mull over it with sleep. Not always possible, of course, but good.
The โdocumenttitle global variableโ may amuse or look kludgy to you, but we like the idea of fundamental DOM members such as โฆ
document.URL
document.title
location.href
โฆ that deserve coding for more than one incarnation โmeaningโ (perhaps only discovered as a project matures) can be accommodated well (via โfunction documenttitleeqโ below) working the logic using Javascript global variables as per โฆ
we went around globally substituting any โdocument.title=[blah];โ code with โdocumenttitleeq([blah];โ code then globally substituted any remaining โdocument.titleโ with โdocumenttitleโ then fixed up any โdocumenttitleeq([blah];โ code with โdocumenttitleeq([blah]);โ code โฆ then โฆ
var documenttitle=document.title; // up the top as the global variable initialization function documenttitleeq(indt) { documenttitle=indt; if (card_game == '500ish') { document.title='500 (hybrid) card game ... ' + scoresuffix; 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 + ' ... OK to play again?')) { location.href=document.URL; } } } } else { document.title=documenttitle; } }
As you see, this helps us with this (hybrid) โ500 card gameโ that somebody not in the game going to look at the host or dealer Player 1โs webpage now has a mechanism to discover what they are playing without having to interfere with that game (designed as a โJust Javascriptโ (ie. โNo Body Definitionโ) project).
Regarding the enforcement of โfollowing of suitโ, sure, itโs an important part of a real game of 500 where four players play and they are in teams of two, but weโre not doing that, yet, with our hybrid 500 card game, and so allow this โhybridโ at least have some variety on this front, as per โฆ
var nominal_numplayers = (document.URL.replace('?','&').indexOf('&card') != -1) ? prompt('How many players are playing your ' + 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. Memories with cross colour match limitation) prefix answer by + and if Any Colour (ie. Memories with a same colour lack of limitation) prefix answer by -) and suffix by .0 for hybrid 500 card game (optionally comma delimited by a list of email/SMS addresses/numbers, else we can show you cards via "turn away" popup windows, and if you want players not to have to follow suit involve a space character somewhere )?', '2') : null;
Again, to see these nuances in action try hosting a (hybrid) โ500 card gameโ of your own with ourโช cards_usefocus.html (latest) versus cards_usefocus.html-----------------GETME (this) cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html----------------GETME (previous ... default) cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html---------------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-----------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Host Aesthetics Tutorial is shown below.
Just Javascript Five Hundred Card Game Host Aesthetics Tutorial
On top of the progress of yesterdayโs Just Javascript Five Hundred Card Game Email Buttons Tutorial , today, weโve been trying to improve โฆ
aesthetics of the host (hybrid) โ500 card gameโ โฆ and in so doing โฆ
improve the โuser experienceโ playing that โ500 card gameโ
We worked on the SVG content to the background images so as to make the cards be โฆ
more legible (via increased size and appropriate repositioning and change to Verdana font family)
colour coded โฆ hearts and diamonds red (via โstroke:red;โ) and clubs and spades black (via โfill:black;โ)
To see this in action try hosting a (hybrid) โ500 card gameโ of your own with ourโช cards_usefocus.html (latest) versus cards_usefocus.html----------------GETME (this) cards_usefocus.html----------------GETME (this) versus cards_usefocus.html---------------GETME (previous ... default) cards_usefocus.html----------------GETME (this) versus cards_usefocus.html--------------GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html----------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game Email Buttons Tutorial is shown below.
Just Javascript Five Hundred Card Game Email Buttons Tutorial
Yesterdayโs Just Javascript Five Hundred Card Game By Correspondence Tutorial โ500 card gameโ communication options felt โฆ
more like โsharingโ โฆ and only mildly โฆ
anything like โcollaborationโ
โฆ and we think that by allowing (submit ) button presses with the โemail via PHP mailโ conduit to affect the โ500 card gameโ display seen by the dealer and hoster (ie. Player 1) is more your โcollaborationโ integration, wouldnโt you say?
Well, itโs possible in two senses โฆ
inline HTML email allows forms with multiple โsubmitโ buttons allowed โฆ as well as โฆ
PHP helper integration to control the existence or not of some web server file(s) โฆ as our research into postMessage ideas got us to realize its brilliance is not enough for what we are after
Still โJust Javascriptโ (ie. โNo Body Definedโ) back at the parent (here with all this), though it constructs emails that can contain a body element in order to navigate via an inline HTML form to โbe a playerโ remotely.
Behind the scenes our new PHP cards_usefocus php helps out ourโช cards_usefocus.html (latest) versus cards_usefocus.html---------------GETME (this) cards_usefocus.html---------------GETME (this) versus cards_usefocus.html--------------GETME (previous ... default) cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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)!
Previous relevant Just Javascript Five Hundred Card Game By Correspondence Tutorial is shown below.
Just Javascript Five Hundred Card Game By Correspondence Tutorial
Yesterdayโs Just Javascript Five Hundred Card Game Joker Tutorial left us with the โto-do listโ โฆ
enforce the following of suits
aesthetics
โuser experienceโ
sharing
โฆ and today, weโve jumped straight to โsharingโ for a few reasons โฆ
collaboration and sharing โฆ yes โฆ but also โฆ
allow โ500 card gameโ players to not be huddled around the one computer โฆ and โฆ
on that one computer used, (now) have a (better) mechanism for player cards be hidden (easier) from the other players in the game, our hybrid being โevery player for their ownโ
โฆ allowing for three modes of communication โฆ
email via PHP mail โฆ our preferred method, because we can do this in the background via our favourite โmidairโ email communication conduit, Ajax /FormData โฆ
var xhr=null; var form=null; function inhouse(inhref) { var ine=inhref.split('mailto:')[1].split('?')[0]; if (ine.toLowerCase() == ine) { form = new FormData(); xhr = new XMLHttpRequest(); form.append('to', ine); form.append('inline', 'y'); form.append('subject', decodeURIComponent(inhref.split('subject=')[1].split('&')[0].split('#')[0])); form.append('body', '<html><body><p style=font-size:36px;>' + decodeURIComponent(inhref.split('body=')[1].split('&')[0].split('#')[0]) + '</p></body></html>'); //alert(decodeURIComponent(inhref.split('body=')[1].split('&')[0].split('#')[0])); xhr.open('post', '//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php', true); xhr.send(form); return ''; } return inhref; }
email via โmailto:โ โaโ link (we do not advertise, but a mixed case email address will use this technique)
SMS via โsms:โ โaโ link
โฆ still all โJust Javascriptโ (ie. โNo Body Definitionโ) in ourโช cards_usefocus.html (latest) versus cards_usefocus.html---------------GETME (this) cards_usefocus.html---------------GETME (this) versus cards_usefocus.html--------------GETME (previous ... default) cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-------------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html---------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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!
Previous relevant Just Javascript Five Hundred Card Game Joker Tutorial is shown below.
Just Javascript Five Hundred Card Game Joker Tutorial
Yesterdayโs lack of a Joker in the โ500โ card game established yesterday with Just Javascript Five Hundred Card Game Tutorial has been remedied.
And we forgot the logic that allows a lead up player to still win (that trick) with a paltry non-trump card if the other users also play cards that are not trumps nor a larger card of that same leading suit, nor the Joker.
Thereโs still a bit more logic to go about the play (ie. enforce the following of suits), then aesthetics and then โuser experienceโ and finally sharing, perhaps.
But see how you go with theโช cards_usefocus.html (latest) versus cards_usefocus.html--------------GETME (this) cards_usefocus.html--------------GETME (this) versus cards_usefocus.html-------------GETME (previous ... default) cards_usefocus.html--------------GETME (this) versus cards_usefocus.html------------GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html--------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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!
Previous relevant Just Javascript Five Hundred Card Game Tutorial is shown below.
Just Javascript Five Hundred Card Game Tutorial
Onto yesterdayโs Just Javascript Memories SVG Emoji CSS Animation Tutorial , today, we add on โฆ
a pared down version of the card game โ500โ โฆ featuring โฆ
no bidding โฆ
no Jokers (yet) โฆ
left and right bowers (Jack trumps, Jack other same colour) as the top two cards โฆ
for 2 to 25 players โฆ
Player 1 leads off first
โฆ the cards dealt out in turn to users and the next card turned over to determine trumps.
Itโs early days for theโช cards_usefocus.html (latest) versus cards_usefocus.html-------------GETME (this) cards_usefocus.html-------------GETME (this) versus cards_usefocus.html------------GETME (previous ... default) cards_usefocus.html-------------GETME (this) versus cards_usefocus.html-----------GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html----------GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html---------GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html--------GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html-------GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html------GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html-----GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html----GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html---GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html--GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html-GETME cards_usefocus.html-------------GETME (this) versus cards_usefocus.html_GETME cards_usefocus.html (latest) versus cards_usefocus.html_GETME (oldest) 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). As such, we anticipate improvements to this first venture into card games that โturn on the winning of tricksโ.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
Just Javascript Card Game Say My Memory Delimiters Tutorial โ
Just Javascript Card Game Say My Memory Delimiters Tutorial
In yesterdayโs Just Javascript Card Game Say My Memory Tutorial we used comma delimitation a lot. But why is that? Well, we like the comma, though it could be some other โnot used in the contentโ character, (and sorry about the split infinitives) because it is so easy to turn โฆ
var anaray=thatstring.split(',');
$anaray=explode(',', $thatstring);
โฆ in two different forms of usefulness in various situations. Perhaps a reason to not look down on those simple string variables you encounter, because they may be full of โdelimitation intelligenceโ!
And so we are at the end of day two of the โฆ
โฆ โlove inโ and we are getting there with code organization, and just need to test more and build up more of those language translation โdelimitedโ strings, and think of a way to try to handle languages that read right to left such as Arabic and Hebrew.
And so thechanged sayphp PHP and MAMP interface to macOS say command brilliance helps out theโdelimiterโ tweaked cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Say My Memory Tutorial is shown below.
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 โฆ
โฆ 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 โฆ
โฆ 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 thechanged sayphp 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.
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 โฆ
โฆ 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('//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);
zxhr.onreadystatechange = showStuffT;
zxhr.send(null);
return awords;
}
function translateit(words) {
var anotherone=-1;
// "//api.mymemory.translated.net/get?q=" + encodeURIComponent(inwords) + "&langpair=" + nonen + "|en"
// //api.mymemory.translated.net/get?q=yo%20trabajamos&langpair=es|en
if (tlngcode != 'en') {
//alert('tlngcode=' + tlngcode);
for (var imn=0; imn<sayvoices.length; imn++) {
if (sayvoices[imn].indexOf(';' + tlngcode + '_') != -1) {
anotherone=imn;
if (sayvoices[imn].toLowerCase().indexOf(';' + lngcode.toLowerCase()) != -1) { minusv='-v ' + sayvoices[imn].split(';')[0] + ' '; return minusv + atranslateit(words, '//api.mymemory.translated.net/get?q=' + encodeURIComponent(words) + '&langpair=' + 'en|' + tlngcode); }
}
}
}
if (anotherone != -1) {
//alert(sayvoices[anotherone].split(';')[0]);
minusv='-v ' + sayvoices[anotherone].split(';')[0] + ' ';
return minusv + atranslateit(words, '//api.mymemory.translated.net/get?q=' + encodeURIComponent(words) + '&langpair=' + 'en|' + tlngcode);
}
return words;
}
function yourencodeURIComponent(incv) {
if (card_game.toLowerCase() == 'bridge') {
if (!in_bidding && !in_kitty && cbid.toLowerCase() != 'none') {
if (cbid.indexOf('mis') != -1) {
return encodeURIComponent(translateit('In your bridge card game with final bid ' + (cbid + ' by Player ' + cbidby + '').replace('None (by Player 1)','Pass').replace('None','Pass') + ' ' + incv.replace(/\[\]/g,'')));
} else {
return encodeURIComponent(translateit('In your bridge card game with final bid ' + (cbid.replace('n',' No Trump').replace('c',' Club').replace('d',' Diamond').replace('s',' Spade').replace('h',' Heart').replace('0',' No Trump') + 's by Player ' + cbidby + '').replace('None by Player 1','Pass').replace('None','Pass') + ' ' + incv.replace(/\[\]/g,'')));
}
} else {
return encodeURIComponent(translateit('In your bridge card game ' + incv.replace(/\[\]/g,'')));
}
} else if (card_game.toLowerCase() == '500ish') {
if (!in_bidding && !in_kitty && cbid.toLowerCase() != 'none') {
if (cbid.indexOf('mis') != -1) {
return encodeURIComponent(translateit('In your 500 card game with final bid ' + (cbid + ' by Player ' + cbidby + '').replace('None (by Player 1)','Pass').replace('None','Pass') + ' ' + incv.replace(/\[\]/g,'')));
} else {
return encodeURIComponent(translateit('In your 500 card game with final bid ' + (cbid.replace('n',' No Trump').replace('c',' Club').replace('d',' Diamond').replace('s',' Spade').replace('h',' Heart').replace('0',' No Trump') + 's by Player ' + cbidby + '').replace('None by Player 1','Pass').replace('None','Pass') + ' ' + incv.replace(/\[\]/g,'')));
}
} else {
return encodeURIComponent(translateit('In your 500 card game ' + incv.replace(/\[\]/g,'')));
}
}
return encodeURIComponent(translateit(incv.replace(/\[\]/g,'')));
}
To see these new โlanguageโ audio commentary parts in action, try the new improved Bridge and 500 game functionality at thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Errors Tutorial is shown below.
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 โฆ
โฆ 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('//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 thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Commentary Tutorial is shown below.
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 โฆ
โฆ or
500bridge and04.004.1 remote user setup except that, now, with these audio possibilities โฆ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 thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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.
Just Javascript Card Game Intranet Tutorial
Augmenting yesterdayโs Just Javascript Card Game Google Translate Tutorial where it said โฆ
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 โฆ
โฆ 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('//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 โฆ
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 thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Google Translate Tutorial is shown below.
Just Javascript Card Game Google Translate Tutorial
Yesterdayโs Just Javascript Card Game Functional Background Buttons Tutorial set up the conditions needed to โฆ
โฆ 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;
}
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');
}
}
}
}
if (notset == '') { return eval('' + cby); }
return cby;
}
To see this next example of a โfunctional background buttonโ in action, try the new improved Bridge and 500 game functionality at thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Functional Background Buttons Tutorial is shown below.
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 โฆ
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 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 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) + 'px ' + eval(0.8 * window.innerHeight) + 'px,' + eval(0.7 * window.innerWidth) + 'px ' + eval(0.8 * window.innerHeight) + 'px' + ' ;background-position:');
} else {
defstyle=defstyle.replace(';background-position:', lastbs + ',' + 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:');
}
}
}
if (lastbp == '' || 1 == 1) {
defstyle=defstyle.replace(';background-image:', lastbp + ',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>', lastbi + (',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>', lastbi + (',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>', lastbi + (',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>', lastbi + (',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>', lastbi + (',linear-gradient(rgba(255,255,255,0.4),rgba(255,255,255,0.4)),url(//www.rjmprogramming.com.au' + backi + ')' + '; } </style>')); // + ' ' + owidth + ' ' + oheight
}
}
To see this first example of a โfunctional background buttonโ in action, try the new improved Bridge and 500 game functionality at thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Invalid Bids Tutorial is shown below.
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 โฆ
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, others, turn) away ').replace('Bid (via SMS) away ', 'Bid (please, others, turn) away ');
setTimeout(gmyalertmc, deftwo);
}
deftwo=200;
} else {
setTimeout(gmyalertmc, deftwo);
deftwo=200;
}
}
To see these nuances in play, try the new improved Bridge and 500 game functionality at thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Popup Alert Tutorial is shown below.
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 โฆ
So, with yesterdayโs Just Javascript Card Game Suit Sort Tutorial you may recall โฆ
โฆ 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 โฆ
โฆ 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 thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Suit Sort Tutorial is shown below.
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 โฆ
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 thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Bridge Card Game Redouble Tutorial is shown below.
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) โฆ
โฆ 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 thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Bridge Card Game Primer Tutorial is shown below.
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 โฆ
โฆ 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 thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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 Five Hundred Card Game Early Complete Exit Tutorial is shown below.
Just Javascript Five Hundred Card Game Early Complete Exit Tutorial
Yesterdayโs Just Javascript Five Hundred Card Game Early Exit Tutorial talked of โฆ
In that last case above, we arrange automation of the scoring, in our variable โscoresuffixโ โฆ so that โฆ
&overallss=[Player 1 and Player 3 score],[Player 2 and Player 4 score]
โฆ facilitating โฆ
&scoresuffix=0.0,0.0,0.0,0.0
โฆ effectively completing resetting the 500 card game โฆ but โฆ
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;
documenttitle=indt;
if (card_game.toLowerCase() == '500ish') {
if (card_game == '500ISH') {
document.title='500 card game where winning bid is ' + (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, ' + ') + ')') >= 40 || 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='500 card game where winning bid is ' + (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='500 card game ... ' + scoresuffix + sss;
} else {
document.title='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;
}
}
In light of this, the scenario of todayโs tutorial picture may horrify some and amuse others, as the scenario of the worldโs shortest game of 500 โฆ
Still going as โJust Javascriptโ (ie. no โbodyโ element definition) try thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Open Misรจre Progress Bar Tutorial is shown below.
Just Javascript Five Hundred Card Game Open Misรจre Progress Bar Tutorial
Even with yesterdayโs Just Javascript Five Hundred Card Game Open Misรจre All Local Tutorial, it may not seem like it, but we have been beavering away keeping the 500 card game โstatus areaโ giving relevant information. Today we load it up even more as a dual purpose โฆ
โฆ as per (the multi-purpose) โฆ
function progressbar(inoutss) {
var outss=inoutss;
if (outss == '') { outss=scoresuffix; }
var totball=0;
var totnball=0;
if (card_game == '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) == '6') { toget=6; tonget=4; }
if (('' + cbid).substring(0,1) == '7') { toget=7; tonget=3; }
if (('' + cbid).substring(0,1) == '8') { toget=8; tonget=2; }
if (('' + cbid).substring(0,1) == '9') { toget=9; tonget=1; }
if (('' + cbid).substring(0,2) == '10') { toget=10; tonget=0; }
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) {
bbtextb=abbtextb.replace(" width='" + abbtextb.split(" width='")[1].split("'")[0] + "'", " width='0'");
//if (defstyle.indexOf(prevbb) == -1) { alert('Oops'); }
defstyle=defstyle.replace(prevbb, bbtextb);
} else {
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);
}
} else {
if (eval('' + totnb) > eval('' + tonget)) {
bbtextb=abbtextb.replace(" width='" + abbtextb.split(" width='")[1].split("'")[0] + "'", " width='0'");
//if (defstyle.indexOf(prevbb) == -1) { alert('OoPs'); }
defstyle=defstyle.replace(prevbb, bbtextb);
} else {
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);
}
}
} 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] + '.0').split('.')[1])) + (eval(((ssallare[2].substring(0,1) == '-') ? '-' : '') + (ssallare[2] + '.0').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] + '.0').split('.')[1])) + (eval(((ssallare[3].substring(0,1) == '-') ? '-' : '') + (ssallare[3] + '.0').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;
}
This mild form of animation is still โJust Javascriptโ (ie. no โbodyโ element definition) in thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Open Misรจre All Local Tutorial is shown below.
Just Javascript Five Hundred Card Game Open Misรจre All Local Tutorial
You may be new to this โ500 card gameโ web application work of yesterdayโs Just Javascript Five Hundred Card Game Open Misรจre Wording Tutorial, in which case it may be that we need to reiterate information about the gameโs workings โฆ
As the project continues weโve found the logic of the first โAll Localโ mode lagging behind, because it is harder. Huh?! Well, it is harder because of the bother we need to take to try to allow players to hide their cards from other players, given some โlooking awayโ co-operation from the players when asked to. And so, just because in the last couple of days we made progress with Open Misรจre logic for remote player scenarios, alas, doesnโt mean weโve had the โAll Localโ equivalent logic working as well. Today we try evening up that score.
It was hard to take this code line being important in making that happen โฆ
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 + ' ').substring(0,3).toLowerCase() == (bids[ibidis] + ' ').substring(0,3).toLowerCase()) {
isbid=true;
gd=('' + dis);
sentanswer=bids[ibidis] + ' ';
console.log('4:sentclick()');
sentclick();
}
}
โฆ we found via โconsole.logโ web inspector tracking down. We suspect, but did not research, that the reason โpasscntโ went weird for โAll Localโ scenarios was as a result of some setTimeout logic self-incrementing โpasscntโ programmatically, meaning the first pass bid (rather than the third, which is better) was setting off the Kitty logic ahead of time. Fixed now though!
The โsssโ variable emoji logic was also causing trouble for Open Misรจre status content fixed via โฆ
if (cbid.slice(-1).toLowerCase().replace('h','d') == 'd') {
sss=' leading ' + cbidby + ' bid ' + cbid + ' ' + emojisuit() + ' ';
} else {
sss=' leading ' + cbidby + ' bid ' + cbid + ' ' + emojisuit();
}
sss=sss.replace('è', String.fromCodePoint(232)).replace('open_', 'open ').replace('è', String.fromCodePoint(232)).replace('open_', 'open ');
With Open Misรจre in All Local mode of use logic we show all players the open hand in a Javascript alert popup window just before the winning bidder is displayed the Kitty Javascript prompt window, as per โฆ
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)) {
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.');
}
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),'');
In โAll Localโ mode of play, can bidding be ignored all together? Yes, backward compatibility is an important principle to try to preserve with ongoing functionalities, where possible, and reasonable.
Yet again, feel free to retry the improved 500 card game part of ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Open Misรจre Wording Tutorial is shown below.
Just Javascript Five Hundred Card Game Open Misรจre Wording Tutorial
With our 500 card game web application of yesterdayโs Just Javascript Five Hundred Card Game Open Misรจre Tutorial the bidding of Misรจre and Open Misรจre bring an unusual dilemma to do with email communication. Even though we hate to confuse we need to weigh โฆ
โฆ and decide on the danger of a bit of โdouble negatives may cause confusionโ because we think most 500 card game players will get it as soon as they see the word โMisรจreโ mentioned, coupled with the awkward sentences used (where โsubjisโ is variable containing email subject content) โฆ
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;
} 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)) {
subjis='Sad news about ' + spare;
}
}
subjis=subjis.replace('è', String.fromCodePoint(232)).replace('open_', 'open ').replace('è', String.fromCodePoint(232)).replace('open_', 'open ');
As well, we sort it out that โฆ
Again, feel free to retry the improved 500 card game part of ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Open Misรจre Tutorial is shown below.
Just Javascript Five Hundred Card Game Open Misรจre Tutorial
The 500 card game of yesterdayโs Just Javascript Five Hundred Card Game Emoji Entities Tutorial, and incarnation before it, hid from the players the chance to bid โฆ
Open Misรจre
โฆ but we want to remedy this because โฆ
โฆ but, we are going to take this on gradually, our part one, today, fixing a couple of issues with remote email players using the PHP mail method, those being โฆ
if ((!in_bidding || in_kitty) && eval('' + omc) >= 0) {
if (('' + hsuffs[eval(-1 + omc)]).replace('null','').indexOf('<table') != -1 && eval('' + curplayer) != eval('' + omc)) {
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' + hsuffs[eval(-1 + omc)].split('<table')[1].split('</table>')[0].replace(/\<tr\ id\=/g, '<tr style=display:none; id=').replace(/SUBMIT/g,'button').replace(/submit/g,'button').replace(/\ href\=/g,' data-href=') + '</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)) + ' ... ' + zsuffs[eval(-1 + omc)] + '</p></body>');
}
}
โฆ within the Inline HTML email to other player emails โฆ and โฆ
Feel free to retry the improved 500 card game part of ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Emoji Entities Tutorial is shown below.
Just Javascript Five Hundred Card Game Emoji Entities Tutorial
We happened to open up a new email client application to the remote 500 card player emails of yesterdayโs Just Javascript Five Hundred Card Game Internationalization Tutorial and, at least for our macOS Mail app, the suit and card emojis came up as gobbledegook in the body Inline HTML section of the the emails.
This discovery, though offputting, also lead, by a few minutes ago (writing this blog post), to a two-pronged improvement to our 500 card game web application as per โฆ
var wsuffs=[];
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;
}
// Example call codeline ...
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]));
// Example of use piecing together remote 500 card player email ...
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 + '.11')[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>');
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 '';
}
โฆ all fine and good, now, for macOS Mail app (email client), but, more importantly, it did not break with any of the previously working mail applications, making these changes. Yay!!!!!
So please retry the improved 500 card game part of ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Internationalization Tutorial is shown below.
Just Javascript Five Hundred Card Game Internationalization Tutorial
Continuing themes from yesterdayโs Just Javascript Five Hundred Card Game Email Tutorial weโve been shoring up aspects to the user experience for our 500 card game web application via โฆ
โฆ and along the way discovered flaws in our โfollow the same suit as leading cardโ logic, now centred around โฆ
function threetoone(threeis) {
var suitis=('' + threeis).slice(-1).toLowerCase();
var crdis=('' + threeis).substring(0,2);
if (crdis == '11' && trumpsare != '0') {
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 maybeno(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() == '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;
}
โฆ as well as non-mobile users being able to hover over bidding buttons to discover what their team scores with that bid, and the background image text up the top left mentioning โBidโ during any bidding phase and โClick (via email) away โฆโ or โClick (via SMS) away โฆโ for remote players, back for the hosterโs web application window, during the โplaying out of the tricksโ phase of the 500 card game, hopefully establishing a means by which the hoster can know what is, or is not and should be, going on with the hosterโs 500 card game, and so enabling informed email communication to get the games back on the rails, perhaps.
Please retry the improved 500 card game part of ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Email Tutorial is shown below.
Just Javascript Five Hundred Card Game Email Tutorial
In a blog post some time before yesterdayโs Just Javascript Five Hundred Card Game CC Tutorial we talked of โorderโ when we presented Just Javascript Five Hundred Card Game Order Tutorial. Donโt know about you, but I find the combination of โฆ
โฆ based Inline HTML in an email, asking for interactive input, โorderlyโ.
Probably we normally think of data to append to an established โtableโ element via the addition of a new row (โtrโ element) or cell (within a row via a โtdโ or โthโ element). Within a โtableโ element though, you can think of โpartitionsโ in the form of โฆ
โฆ which have that synergy with a webpageโs โheadโ and โbodyโ elements, the theme of the current blog posting thread being to do away with the need for a โbodyโ element (except for our Inline HTML Emails (which canโt really do anything much without their โbodyโ elements)).
We do a bit of uppercase/lowercase work with the end of โtheadโ element (ie. </THEAD>) to leave our email Inline HTML โtableโ โtheadโ elements blank for โฆ
โฆ but then start to fill in the โtheadโ element for the โplaying out of the tricksโ emails, adding todayโs work, better card game status information, added to the top of the tabular information presented. Rather than fret about adding to the top, we just slot into the unallocated โtheadโ slot, for these scenarios, as per โฆ
function tabord(indivhtml) {
var ilook=0, jlook=1, klook=0, cbidfound='SUBMIT', tdyellow='';
var slookfor=[' data-suit=s', ' data-suit=c', ' data-suit=d', ' data-suit=h'];
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 (in_kitty) {
console.log('tds_kitty=' + tds_kitty);
outdivhtml=outdivhtml.replace('</tbody>', tds_kitty + '</tbody>'); //.replace('</thead>','</THEAD>');
outdivhtml=outdivhtml.replace('</tbody>', '<tr><td>Bidding<br>Your Current Bid: None<td><input type=' + cbidfound + ' name=myanswer value="pass "></input></td></TR></tbody>');
} else {
outdivhtml=outdivhtml.replace('</tbody>', '<tr><td>Bidding<br>Current Bid: None<td><input type=' + cbidfound + ' name=myanswer value="pass "></input></td></TR></tbody>');
}
if (cbid.toLowerCase().trim().replace('pass','none').replace('none','') != '') { cbidfound='button'; }
twentythree--;
twentythree--;
for (klook=0; klook<bids.length; klook++) {
if (bids[klook].toLowerCase().trim() == cbid.toLowerCase().trim()) { tdyellow=' title="Current leading bid by Player ' + cbidby + '" class=isyellow'; }
if (bids[klook].indexOf('open') == 0) {
outdivhtml=outdivhtml.replace('</TR>', '<td' + tdyellow + '><input style=display:none; type=' + cbidfound + ' name=myanswer value=' + bids[klook] + '></input></td></TR>');
} else {
outdivhtml=outdivhtml.replace('</TR>', '<td' + tdyellow + '><input type=' + cbidfound + ' name=myanswer value="' + bids[klook] + ' "></input></td></TR>');
}
if (bids[klook].toLowerCase().trim() == cbid.toLowerCase().trim()) { cbidfound='SUBMIT'; }
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 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++) {
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;
return outdivhtml.replace('<thead></thead>', '<thead><td colspan=' + twentythree + '>500 Card Game Player' + eval('' + curplayer) + ' Name: <input 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) ... ' + wemstuff.replace(/\-\ \ /g, '- <font color=red>').replace(/\ \ /g, '</font>') + '</td></tr></thead>');
}
You may have noticed with yesterdayโs work, improvements to the email subject lines during the 500 card game โplaying of the tricksโ phase, but there are two good reasons to prefer to (additionally) do this in the email body sectionโs Inline HTML. There, you can โฆ
Please retry the tweaked 500 card game part of ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game CC Tutorial is shown below.
Just Javascript Five Hundred Card Game CC Tutorial
On top of yesterdayโs Just Javascript Five Hundred Card Game Names Tutorial โnames for numbersโ work, today we have two themes to the work โฆ
โฆ which we facilitated among the changed โfes()โ function we show below, along with its buddies โฆ
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]);
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('500 Card Game Player', '500 Card Game Player ');
}
return ines;
}
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 prevcsuff='';
var sc='';
var hjg='';
var ipl=0, jpl=0;
var coms=ines.split(',');
if (eval('' + coms.length) > 1) {
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) {
ccnames[eval('' + nines)]=fesh(coms[jpl]);
} else {
bccnames[eval('' + nines)]=fesh(coms[jpl]);
}
}
return ines;
}
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);
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);
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);
document.head.innerHTML+=bpmore(defstyle);
}
return ines;
}
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 + ']';
}
return ines;
}
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 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)];
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)];
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)];
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)];
return defstyle.replace(dfrom, dto);
} else if (defstyle.indexOf(dfrom) != -1) {
return defstyle.replace(dfrom, dto);
}
return defstyle.replace(dfrom, dto);
}
Try the tweaked 500 card game part of ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Names Tutorial is shown below.
Just Javascript Five Hundred Card Game Names Tutorial
Onto yesterdayโs Just Javascript Five Hundred Card Game Rendering Timing Tutorial, being our web application is now dealing with collaboration and teams, wouldnโt it be good to provide a mechanism to turn those boring โฆ
Player 1,Player 2,Player 3,Player 4
โฆ number feeling default labels for players be able to be turned into names? We accept, now, email definitions such as โฆ
Robert James Metcalfe[rmetcalfe15@gmail.com]
โฆ to facilitate this additional user experience improvement.
It needed all these new Javascript called functions โฆ
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;
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 + ' ').substring(0,1) < '0' || ('' + yhisp + ' ').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];
}
}
return outes.replace('500 Card Game Player', '500 Card Game Player ');
}
return ines;
}
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 fes(ines, nines) { // strip Name Of[email@at] to email@at
var prevcsuff='';
var hjg='';
var ipl=0;
var nameas=ines.split('[');
if (eval('' + nameas.length) == 2) {
if (nameas[1].indexOf(']') != -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);
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);
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);
document.head.innerHTML+=bpmore(defstyle);
}
return ines;
}
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 + ']';
}
return ines;
}
function defstylereplace(dfrom, dto) {
if (defstyle.indexOf(dfrom) != -1) {
return defstyle.replace(dfrom, dto);
} else if (defstyle.indexOf(' leading ') != -1) {
dfrom=' ' + defstyle.split(' leading ')[0].split(' ')[eval(-1 + defstyle.split(' leading ')[0].split(' ').length)];
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)];
return defstyle.replace(dfrom, dto);
}
return defstyle.replace(dfrom, dto);
}
โฆ to take this first draft of changes to make this naming functionality happen.
We hope you utilize the improved naming functionality with the 500 card game part of Just Javascript Five Hundred Card Game Continuous Scoring Tutorial with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Rendering Timing Tutorial is shown below.
Just Javascript Five Hundred Card Game Rendering Timing Tutorial
Every now and then, and usually involving the timing of a Javascript prompt or confirm or alert popup window, we are caught out by that tiny snippet of time it takes the web browser to complete a rendering task. If that rendering task has not completed ahead of the modal Javascript popup windows it is not always โmission criticalโ unworkable for the user, as with our current project where we have put up with the annoyance for more than a week now. The scenario of the issue is โฆ
In the 500 card game (with all players non-remote (ie. presumably all using the one device)) on, say, Player 1, clicking their first card, and in the interests of allowing players to only see their own cards, before our fix, the prompt window prompting Player 2 to tell others to turn away because the next prompt window display Player 2 cards, that Player 1 click turn over of card webpage rendering had not finished.
โฆ but better would it be if it was, because then Player 1 involvement would be done and dusted, and would not be a concern going forward with Player 2 activities.
Believe it or not, on occasions all that is needed here to address this annoyance is a fifth of a second of delay, as per โฆ
var passcnt=0;
var gwh='';
function myalertmc(wh) { // new myalertmc() function ...
gwh=wh;
if (passcnt != 0) {
gmyalertmc(); // ... sometimes if okay without delay ...
} else {
setTimeout(gmyalertmc, 200); // ... but sometimes a very short delay is enough time for webpage rendering to complete ...
}
}
function gmyalertmc() { // (wh) ... mainly just the old myalertmc() function ...
var wh='';
if (gwh != '') {
wh=gwh;
gwh='';
}
// Rest of old myalertmc() function code follows, where a Javascript prompt popup window happens ...
}
We hope you can see an improvement on yesterdayโs Just Javascript Five Hundred Card Game Continuous Scoring Tutorial with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Continuous Scoring Tutorial is shown below.
Just Javascript Five Hundred Card Game Continuous Scoring Tutorial
Up until yesterdayโs Just Javascript Five Hundred Card Game Kitty Dropdown Tutorial any โ500 card gameโ web application work was self contained within a single execution of a single web page. But with a 4 player 500 card game, it is usually the case that a game spans several shuffle and deal sets of 10 trick โplaysโ for a couple of players to reach the 500 or -500 score that determines a winner of that game.
And so it comes to scoring logic today, and a โget argumentsโ arrangement (via ? and & arguments) to carry on the game โฆ
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 jscores=[0,0,0,0];
var scoresuffix='';
function documenttitleeq(indt) {
documenttitle=indt;
if (card_game.toLowerCase() == '500ish') {
if (card_game == '500ISH') {
document.title='500 card game where winning bid is ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass').replace('1','1,III').replace('2','2,IV').replace('3','3,1').replace('4','4,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, ' + ') + ')') >= 40) {
if (eval('' + totcpp) > 0) {
totcpp=-totcpp;
var llj=sfhz(false);
if (confirm('Thanks for playing the 500 card game ... ' + scoresuffix + sss + ' ... OK to play again?')) {
location.href=llj; //lurl();
}
}
}
} else {
if (cbid.replace('None', '') != '') {
document.title='500 card game where winning bid is ' + (cbid + ' (by Player ' + cbidby + ')').replace('None (by Player 1)','Pass').replace('None','Pass').replace('1','1,III').replace('2','2,IV').replace('3','3,1').replace('4','4,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='500 card game ... ' + scoresuffix + sss;
} else {
document.title='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 sfhz(torf) {
var om='';
var psx=scoresuffix;
var jkscores=scoresuffix.split(',');
var iyt=0, lurldone=false;
var tscores=[];
for (iyt=0; iyt<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<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('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 6) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
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('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 7) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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))]));
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('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 8) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
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('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 9) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
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('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) >= 10) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
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('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
document.head.innerHTML+=bpmore(defstyle);
} else {
if (eval(tscores[1] + tscores[3]) == 0) {
jscores[eval(-1 + eval('' + cbidby))]+=eval('' + sbid[iyt]);
} else {
jscores[eval(-1 + eval('' + cbidby))]-=eval('' + 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 + '<');
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 == '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;
}
// code snippet for score changing uses code above as per ...
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]);
}
And so, please join us on our โ500 card gameโ (almost there) non-hybrid journey with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Kitty Dropdown Tutorial is shown below.
Just Javascript Five Hundred Card Game Kitty Dropdown Tutorial
As mentioned with yesterdayโs Just Javascript Five Hundred Card Game Kitty Logic Tutorial, today is an aesthetics day regarding dropdown option colours (not so flexible) and emojis (a tiny bit better). Okay, so the card emojis have no inherent colour, but we had mixed success researching a red diamond (yes) and a red heart (no) suit emoji โrednessโ solution.
Also, we restricted some bidding button email click options by turning input type=submit into input type=button (ie. no navigation but looks the same) for bids that become too low to be valid in the context of the 500 card game.
So please join us on our โ500 card gameโ (getting ever closer to a) non-hybrid journey with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Kitty Logic Tutorial is shown below.
Just Javascript Five Hundred Card Game Kitty Logic Tutorial
Adding to yesterdayโs Just Javascript Five Hundred Card Game Remote Kitty Tutorial weโve concluded โฆ
โฆ surely?!
And so we want to see if there are some aesthetic improvements (and user experience improvements restricting some poor button presses) to the emails, for tomorrowโs work, containing those dropdowns within the โฆ
โฆ involving that twin bidding/kitty Javascript prompt window ask after three pass answers from bidding players.
Please join us on our โ500 card gameโ (getting ever closer to a) non-hybrid journey with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Remote Kitty Tutorial is shown below.
Just Javascript Five Hundred Card Game Remote Kitty Tutorial
On top of yesterdayโs Just Javascript Five Hundred Card Game Kitty Setup Tutorial, today weโve been concentrating on the scenario of remote email players and the winning bidder working the kitty.
Then, it occurred to us during this, that where we said yesterday โฆ
โฆ that in so doing we were adding an unnecessary ask (perhaps) into the โequationโ of how the โ500 card gameโ operates, in that on the third โpassโ bid we get back to the last successful bidder anyway, so why not offer them the chance to do either โฆ
โฆ and this was our main design issue for the day, leaving non-remote scenarios for tomorrow.
And so, if you join us on our โ500 card gameโ (getting towards) non-hybrid journey with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive run (for your platform, and if non-mobile it will try child popup windows), just be aware that a kitty for a non-remote player you swap cards via will not be enacted for a day or so. 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)!
Previous relevant Just Javascript Five Hundred Card Game Kitty Setup Tutorial is shown below.
Just Javascript Five Hundred Card Game Kitty Setup Tutorial
Operation โKitty Hawkโ proceeds today on top of the bidding work of yesterdayโs Just Javascript Five Hundred Card Game Bidding Tutorial. Itโs just that โฆ well โฆ itโs a bit more involved and we only got to the Kitty bit, not the Hawk bit, today.
Tomorrow we should be โtaking offโ regarding having a kitty (of 3 cards, optionally swappable for others in the winning bidders hand, in a game of 500 played by 4 players).
Weโve plumped for an extra โKittyโ table row be added to a remote email playerโs first โplaying of cardsโ email whereby they both โฆ
for (ixc=0; ixc<hands.length; ixc++) {
bdl=hands[ixc].split(' '); // used in "Other code goes here"
if (eval('' + ixc) >= 40) {
eis=0;
//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]);
}
}
//alert(String.fromCodePoint(eis) + ' threeis=' + threeis + 'zsuffs[]=' + zsuffs[eval(-1 + curplayer)]);
if (tds_kitty == '') {
tds_kitty='<tr><td>Kitty</td><td><select name=swap1><option value="">Kitty Card 1 ' + String.fromCodePoint(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)) + '">' + zsuffs[eval(-1 + curplayer)].trim().split(' ')[eval('' + ihjk)] + '</option></SELECT>');
}
tds_kitty=tds_kitty.replace('</SELECT>','</select>');
} else {
tlen=eval(-1 + eval('' + tds_kitty.split('</td>').length));
//alert('tlen=' + tlen + ' ' + tds_kitty + ' ' + zsuffs[eval(-1 + curplayer)].trim().split(' ').length);
tds_kitty=tds_kitty.replace('</td></TR>','</td><td><select name=swap' + tlen + '><option value="">Kitty Card ' + tlen + ' ' + String.fromCodePoint(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)) + '">' + zsuffs[eval(-1 + curplayer)].trim().split(' ')[eval('' + ihjk)] + '</option></SELECT>');
}
tds_kitty=tds_kitty.replace('</SELECT>','</select>');
}
}
// Other code goes here
}
tds_kitty=tds_kitty.replace('</td></TR>','</td><td colspan=' + thirty + '></td></tr>');
โฆ (whose data navigates with the form (via defined โnameโ properties), and tomorrow, too, weโll turn off the card โaโ links on kitty scenarios, because we want you to navigate via the email inline HTML form rather than โaโ href navigation) โฆ as well as, the usual โฆ
And so today the navigation out from this is achieved and tomorrow we have to cater for โKitty Hawkโ getting down again โฆ
If you join us on our โ500 card gameโ (getting towards) non-hybrid journey with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive run (for your platform, and if non-mobile it will try child popup windows), just be aware that a kitty you swap cards via will not be enacted for a day or so. 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)!
Previous relevant Just Javascript Five Hundred Card Game Bidding Tutorial is shown below.
Just Javascript Five Hundred Card Game Bidding Tutorial
Moving on from yesterdayโs Just Javascript Five Hundred Card Game Order Tutorial we start out on our โ500 card gameโ bidding phase made up of โฆ
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"];
โฆ the โopen_misรจreโ a job for another day
โฆ and we are concentrating on the first part today. This bidding for the โ04.0โ scenario still needs to hide cards from other players โฆ doh! As such, it is a whole layer of code (while variable in_bidding is true) on top of a hybrid 500 card game modus operandi. Funnily enough, even for non-email participants we converge on the email button press code in function sentclick (to arrive at, within that function) where you may discern that the trigger to move on is 4 โpassโ bids in a row โฆ
if (in_bidding) {
ma=sentanswer;
//alert('sent ma=' + ma);
if (ma.toLowerCase().indexOf('pass') == 0) {
passcnt++;
if (passcnt == 4) {
in_bidding=false;
curplayer=eval('' + cbidby);
lastwinner=eval('' + cbidby);
donelistis=',1,2,3,4,';
if (cbid.trim().slice(-1).toLowerCase() == 'n' || cbid.toLowerCase().indexOf('mis') != -1) {
trumpsare='0';
} else {
trumpsare=cbid.trim().slice(-1).toLowerCase();
}
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);
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]);
}
}
}
}
}
if (eval('' + emailsms.length) >= eval('' + curplayer)) {
//alert('7');
if (('' + emailsms[eval('' + curplayer)]).trim() != '') {
//alert('8');
remote=true;
retcom(msuffs[eval(-1 + bidplayer)], rsuffs[eval(-1 + bidplayer)]);
}
}
//alert('9');
if (1 == 1) {
if (!remote) { myalertmc('Player ' + curplayer + ' cards are ... ' + 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;
retcom(msuffs[eval(-1 + bidplayer)], rsuffs[eval(-1 + bidplayer)]);
}
}
//alert('9');
if (1 == 1) {
if (!remote) { myalertmc('Player ' + curplayer + ' cards are ... ' + zsuffs[eval(-1 + curplayer)]); }
}
}
} else {
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()) {
//alert('found bid ' + bids[ibidis]);
thisbidrank=ibidis;
if (eval('' + thisbidrank) > eval('' + cbidrank)) {
//alert('found relevant bid ' + bids[ibidis]);
cbid=bids[ibidis];
//alert('1');
cbidby=eval('' + bidplayer);
//alert('2');
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;
retcom(msuffs[eval(-1 + bidplayer)], rsuffs[eval(-1 + bidplayer)]);
}
}
//alert('9');
if (1 == 1) {
if (!remote) { myalertmc('Player ' + curplayer + ' cards are ... ' + zsuffs[eval(-1 + curplayer)]); }
}
}
}
}
}
}
And so, again, join us on our โ500 card gameโ (getting towards) non-hybrid journey with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Order Tutorial is shown below.
Just Javascript Five Hundred Card Game Order Tutorial
Many humans get comfort from โorderโ. โOrderโ means many things to many people. Our recent โcolour codingโ forays developing our current โ500 card gameโ are our expressions of โorderโ.
If you actually play 500 with cards dealt to four players (one of them you) in two teams of two it will be interesting to see how each player re-organizes, or not, the ten cards they are dealt. Personally, I break into suit groups and even within those groups I sort (curiously for bridge card game rules, quite often), and later I might try to put right bowers into appropriate rearranged suits depending on what trumps ends up being after the bidding finishes.
We want to do something similar (but no โwithin suit sortingโ), hoping that expression of โorderโ is a better presentation for our online players too?! The fact that the [playerNumer].[cardNumber]โs become disordered is the price (we have decided) to pay, but we think the users will see how these just represent an expression of a tailored โback of the cardโ look, and get used to this, but relax a bit with the game as โorderโ increases.
And so onto yesterdayโs Just Javascript Five Hundred Card Game Smaller Deck Tutorial we add to a remote email users presentation the redisplay of data into an HTML table with four rows corresponding to the card suits the players cards fall into.
function tabord(indivhtml) {
var ilook=0, jlook=1;
var slookfor=[' data-suit=c', ' data-suit=d', ' data-suit=h', ' data-suit=s'];
var slooks=[];
var outdivhtml='<br><table border=2><thead></thead><tbody></tbody></table>'
for (ilook=0; ilook<slookfor.length; ilook++) {
slooks=(indivhtml + ' <input ').split(slookfor[ilook]);
twentythree=24;
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++) {
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);
return outdivhtml;
}
Again, join us on our โ500 card gameโ (getting towards) non-hybrid journey with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Smaller Deck Tutorial is shown below.
Just Javascript Five Hundred Card Game Smaller Deck Tutorial
โIn betweenโ, as a phrase, resonates with me regarding computer programming. To me, programming sits between โฆ
To do better than that โstatic modelโ above might rely on user acceptance testing by groups of real humans, hopefully with as much diversity as possible. Perhaps, open feedback, is an alternative way there.
Our โhybridโ โ500 card gameโ functionality has been gradually climbing up the scale above, but to jump to a non-hybrid โ500 card gameโ involving โฆ
โฆ is quite a big job, and today (after yesterdayโs Just Javascript Five Hundred Card Game Follow Suit Colour Coding Tutorial) we creep onto the big job from that โdisplay affectingโ โnot all cards of deck usedโ small job. How first to allow the host specify thet the โ500 card gameโ is non-hybrid โฆ
var nominal_numplayers = (document.URL.replace('?','&').indexOf('&card') != -1) ? prompt('How many players are playing your ' + 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. Memories with cross colour match limitation) prefix answer by + and if Any Colour (ie. Memories with a same colour lack of limitation) prefix answer by -) and suffix by .0 for hybrid 500 card game (or use 04.0 to play 4 players in two teams with bidding version and optionally comma delimit by a list of email/SMS addresses/numbers, else we can show you cards via "turn away" popup windows, and if you want players not to have to follow suit involve a space character somewhere)?', '2') : null;
The smaller deck coding biggest step? Redefining the โspcpsโ and โcardsโ arrays, when we detect a โ04.0โ scenario above, cutting out 2โs and 3โs and red 4โs, is the start you then code around with a โsuck it and seeโ (approach) aided by a web browser web inspector, is how we approached the start of our long journey.
Please join us on our โ500 card gameโ non-hybrid journey with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Follow Suit Colour Coding Tutorial is shown below.
Just Javascript Five Hundred Card Game Follow Suit Colour Coding Tutorial
Onto yesterdayโs Just Javascript Five Hundred Card Game Follow Suit Tutorial as far as remote email players of the hybrid โ500 card gameโ go we come at improving the user experience, today, from two different colour coding ideas โฆ
<font color=red>&#[heartOrDiamondEmojiCodePoint];</font>
โฆ encouraging the following of suit for such remote users, and adding that clarity to help avoid some confusion playing the game (as a remote user sees none of the context the host or dealer of the โ500 card gameโ sees), and keeping it flowing without the host and dealer doling out any โdid not follow suitโ return email warnings that hold up the game.
All this colour coding is appearing within the (inline HTML) body section of the email. The subject section relies on the inherent colour of the emoji card, and that, up to this point of time, even for hearts and diamonds, is black.
So, yet again, to see these nuances in action try hosting a (hybrid) โ500 card gameโ of your own with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Follow Suit Tutorial is shown below.
Just Javascript Five Hundred Card Game Follow Suit Tutorial
For todayโs work progressing yesterdayโs Just Javascript Five Hundred Card Game Host Aesthetics Tutorial we had as an email to oneself โฆ
โฆ the incidentals for today on top of the planned โenforcing follow suitโ work from a few days ago.
Writing โchoresโ down ahead of a day is, of course, highly recommended, as the brain can mull over it with sleep. Not always possible, of course, but good.
The โdocumenttitle global variableโ may amuse or look kludgy to you, but we like the idea of fundamental DOM members such as โฆ
โฆ that deserve coding for more than one incarnation โmeaningโ (perhaps only discovered as a project matures) can be accommodated well (via โfunction documenttitleeqโ below) working the logic using Javascript global variables as per โฆ
var documenttitle=document.title; // up the top as the global variable initialization
function documenttitleeq(indt) {
documenttitle=indt;
if (card_game == '500ish') {
document.title='500 (hybrid) card game ... ' + scoresuffix;
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 + ' ... OK to play again?')) {
location.href=document.URL;
}
}
}
} else {
document.title=documenttitle;
}
}
As you see, this helps us with this (hybrid) โ500 card gameโ that somebody not in the game going to look at the host or dealer Player 1โs webpage now has a mechanism to discover what they are playing without having to interfere with that game (designed as a โJust Javascriptโ (ie. โNo Body Definitionโ) project).
Regarding the enforcement of โfollowing of suitโ, sure, itโs an important part of a real game of 500 where four players play and they are in teams of two, but weโre not doing that, yet, with our hybrid 500 card game, and so allow this โhybridโ at least have some variety on this front, as per โฆ
var nominal_numplayers = (document.URL.replace('?','&').indexOf('&card') != -1) ? prompt('How many players are playing your ' + 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. Memories with cross colour match limitation) prefix answer by + and if Any Colour (ie. Memories with a same colour lack of limitation) prefix answer by -) and suffix by .0 for hybrid 500 card game (optionally comma delimited by a list of email/SMS addresses/numbers, else we can show you cards via "turn away" popup windows, and if you want players not to have to follow suit involve a space character somewhere)?', '2') : null;
Again, to see these nuances in action try hosting a (hybrid) โ500 card gameโ of your own with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Host Aesthetics Tutorial is shown below.
Just Javascript Five Hundred Card Game Host Aesthetics Tutorial
On top of the progress of yesterdayโs Just Javascript Five Hundred Card Game Email Buttons Tutorial, today, weโve been trying to improve โฆ
We worked on the SVG content to the background images so as to make the cards be โฆ
To see this in action try hosting a (hybrid) โ500 card gameโ of your own with ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game Email Buttons Tutorial is shown below.
Just Javascript Five Hundred Card Game Email Buttons Tutorial
Yesterdayโs Just Javascript Five Hundred Card Game By Correspondence Tutorial โ500 card gameโ communication options felt โฆ
โฆ and we think that by allowing (submit) button presses with the โemail via PHP mailโ conduit to affect the โ500 card gameโ display seen by the dealer and hoster (ie. Player 1) is more your โcollaborationโ integration, wouldnโt you say?
Well, itโs possible in two senses โฆ
Still โJust Javascriptโ (ie. โNo Body Definedโ) back at the parent (here with all this), though it constructs emails that can contain a body element in order to navigate via an inline HTML form to โbe a playerโ remotely.
Behind the scenes our new PHP cards_usefocusphp helps out ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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)!
Previous relevant Just Javascript Five Hundred Card Game By Correspondence Tutorial is shown below.
Just Javascript Five Hundred Card Game By Correspondence Tutorial
Yesterdayโs Just Javascript Five Hundred Card Game Joker Tutorial left us with the โto-do listโ โฆ
โฆ and today, weโve jumped straight to โsharingโ for a few reasons โฆ
โฆ allowing for three modes of communication โฆ
var xhr=null;
var form=null;
function inhouse(inhref) {
var ine=inhref.split('mailto:')[1].split('?')[0];
if (ine.toLowerCase() == ine) {
form = new FormData();
xhr = new XMLHttpRequest();
form.append('to', ine);
form.append('inline', 'y');
form.append('subject', decodeURIComponent(inhref.split('subject=')[1].split('&')[0].split('#')[0]));
form.append('body', '<html><body><p style=font-size:36px;>' + decodeURIComponent(inhref.split('body=')[1].split('&')[0].split('#')[0]) + '</p></body></html>');
//alert(decodeURIComponent(inhref.split('body=')[1].split('&')[0].split('#')[0]));
xhr.open('post', '//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php', true);
xhr.send(form);
return '';
}
return inhref;
}
โฆ still all โJust Javascriptโ (ie. โNo Body Definitionโ) in ourchanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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!
Previous relevant Just Javascript Five Hundred Card Game Joker Tutorial is shown below.
Just Javascript Five Hundred Card Game Joker Tutorial
Yesterdayโs lack of a Joker in the โ500โ card game established yesterday with Just Javascript Five Hundred Card Game Tutorial has been remedied.
And we forgot the logic that allows a lead up player to still win (that trick) with a paltry non-trump card if the other users also play cards that are not trumps nor a larger card of that same leading suit, nor the Joker.
Thereโs still a bit more logic to go about the play (ie. enforce the following of suits), then aesthetics and then โuser experienceโ and finally sharing, perhaps.
But see how you go with thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive 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!
Previous relevant Just Javascript Five Hundred Card Game Tutorial is shown below.
Just Javascript Five Hundred Card Game Tutorial
Onto yesterdayโs Just Javascript Memories SVG Emoji CSS Animation Tutorial, today, we add on โฆ
โฆ the cards dealt out in turn to users and the next card turned over to determine trumps.
Itโs early days for thechanged cards_usefocushtml code behind the โJust Javascriptโ MemoriesCard Game or liverun with single window (good for mobile) or defaultlive run (for your platform, and if non-mobile it will try child popup windows). As such, we anticipate improvements to this first venture into card games that โturn on the winning of tricksโ.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.