Numbers Guessing Game
Your Numbers Game
Get
clueYour
answerYour
ScoreClue? Score 0/0
-
Recent Posts
- PHP Exif Quiz Geographicals Tutorial
- PHP Exif Quiz Tutorial
- PHP Exif Retention off iPhone Images Tutorial
- List to Grid Layout CSS Media Query Tutorial
- List to Grid Layout Primer Tutorial
- Out and About WordPress Blog Content Tweaks Just with iPhone Tutorial
- Command Line History By Date Tutorial
- Overseas Travel Global Roaming Mobile Primer Tutorial
Categories
- Ajax
- Android
- Animation
- Anything You Like
- Code::Blocks
- Coding
- Colour Matching
- Data Integration
- Database
- Delphi
- Eclipse
- eLearning
- ESL
- Event-Driven Programming
- Games
- GIMP
- GUI
- Hardware
- Installers
- iOS
- Land Surveying
- Moodle
- Music Poll
- NetBeans
- Networking
- News
- Not Categorised
- OOP
- Operating System
- Photography
- Projects
- Signage Poll
- Software
- SpectroPhotometer
- Tiki Wiki
- Trips
- Tutorials
- Uncategorized
- Visual Studio
- Xcode
Meta
Tags
Ajax animation background button canvas command line CSS Did you know DOM dropdown email emoji event form game Google Google chart hashtag HTML IFRAME image iOS Javascript MAMP media mobile navigation onclick overlay PHP popup programming select share sharing SMS SVG table text textarea tutorial url video web browser webpageYour Background Image
OnTopList
Tag Archives: FormData
Just Javascript Card Game Popup Alert Tutorial
If you’ve “lasted the distance” in this “Just Javascript” blog posting thread right back to the days of the Memories card game, you’ll know we started this “no body definition” (in the parent window) way back then adding “card intelligence” via popup windows (ie. windows that use window.open and keep a track of them via window.open’s return value and the window.opener value from the popup window point of view back to the parent). Well … It’s the Return of the Popup! So, with yesterday’s Just Javascript Card Game Suit Sort Tutorial you may recall … the prompt popup window does not allow for copy/paste of the prompt, but the alert box does, and so answers of “?” at some prompt windows, present relevant player cards in an alert box whereby its copy/paste capabilities may offer the player the chance to increase the emoji card font size to be better readable, in n on-remote player scenarios … well, that “alert” Javascript popup window still holds because there are that many ways window.open scenarios can fail these days, it becomes our “?” logic fallback position. But if window.open works, well, the whole “can not see what cards we have for non-remote players” dilemma can be resolved by either/both … still, copy/paste contents to a third party text editor or viewer … but more happily in our mind … our inhouse window.open popups are designed to show these card and suit emojis with a big font that should help … and … … also we sequence this window.open popup ahead of a prompt Javascript window “reask” (of the same question) that self-minimizes after 8 seconds (extendable via your own window.open clicks). A long running bugbear, for us, and perhaps for you, gets a makeover improvement, we hope you agree?! And so, try the new improved Bridge and 500 game functionality at the changed cards_usefocus.html code behind the “Just Javascript” Memories Card Game or live run with single window (good for mobile) or default live run (for your platform, and if non-mobile it will try child popup windows). Try adding “.0” to number of card players to play (our hybrid) “500” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “500 card game” players (who can affect the game remotely via email)! Try adding “.1” to number of card players to play (our hybrid) “Bridge” card game,
Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials
|
Tagged alert, arguments, array, background, background image, background-position, background-repeat, background-size, bid, bidding, body, bookmarklet, bridge, button, card game, cards, cell, click, codepoint, collaboration, colour, colour coding, comma, console.log, content, content management, copy, createElement, CSS, CSS3, cursor, data uri, deal, defence, delay, delimit, delimiter, design, document.createElement, document.querySelectorAll, document.URL, double click, drag, drag and drop, dropdwon, email, emailee, emoji, entity, event, fallback, filter, focus, font, form, FormData, game, games, global, global variable, head, HTML, html entity, internationalization, Javascript, joker, keyframes, kitty, label, list, localStorage, logic, macOS, Mail, mailto, Mapping, mclick, Memories, name, names, naming, navigation, onions, order, paste, player, popup, preventDefault, programming, progress, progress bar, prompt, quiz, render, rendering, row, score, scoring, screenLeft, screenTop, select, selector, sessionStorage, setTimeout, share, sharing, SMS, sort, String.fromCodePoint, style, styling, subject, submit, suit, SVG, table, tabular, tbody, thead, timing, touch, trick, tutorial, user experience, UX, variable, web browser, web inspector, webpage, window.opener
|
Leave a comment
Just Javascript Card Game Suit Sort Tutorial
Onto yesterday’s Just Javascript Bridge Card Game Redouble Tutorial we have two improvements to show today, they being … for 500 and bridge card games we now add to the sorting of cards into suits, the sorting of cards within that suit (to the best of our ability, in the case of 500) the prompt popup window does not allow for copy/paste of the prompt, but the alert box does, and so answers of “?” at some prompt windows, present relevant player cards in an alert box whereby its copy/paste capabilities may offer the player the chance to increase the emoji card font size to be better readable, in n on-remote player scenarios Below is the new non-remote card display sorting Javascript functionality … function reorderz(inpn) { var inm=0; var newz=”; var rone=”; var newzs=[]; var zz=’00’; var thec=’c’; var thes=’s’; var rin=ysuffs[eval(-1 + eval(” + inpn))].substring(1).split(” + inpn + doteleven)[0].split(‘ ‘); if (card_game.toLowerCase() == ‘500ish’) { zz=’17’; thec=’C’; thes=’S’; } for (inm=0; inm<rin.length; inm++) { if (rin[inm].indexOf(‘,’) != -1) { rone=rin[inm].split(‘,’)[1] + “.gif”; if (rone.indexOf(‘c.’) != -1) { rone=thec + rone.replace(‘c.’,’.’); } else if (rone.indexOf(‘s.’) != -1) { rone=thes + rone.replace(‘s.’,’.’); } else if (rone.indexOf(‘d.’) != -1) { rone=’d’ + rone.replace(‘d.’,’.’); } else if (rone.indexOf(‘h.’) != -1) { rone=’h’ + rone.replace(‘h.’,’.’); } //alert(rone.replace(’11’,zz).replace(’02’,’92’).replace(’03’,’83’).replace(’04’,’74’).replace(’05’,’65’).replace(’06’,’56’).replace(’07’,’47’).replace(’08’,’38’).replace(’09’,’29’).replace(’10’,’18’).replace(’12’,’16’).replace(’13’,’15’) + ‘,’ + inm); newzs.push(rone.replace(’11’,zz).replace(’02’,’92’).replace(’03’,’83’).replace(’04’,’74’).replace(’05’,’65’).replace(’06’,’56’).replace(’07’,’47’).replace(’08’,’38’).replace(’09’,’29’).replace(’10’,’18’).replace(’12’,’16’).replace(’13’,’15’) + ‘,’ + inm); } } if (newzs.length == 0) { return zsuffs[eval(-1 + eval(” + inpn))].split(” + inpn + doteleven)[0]; } else { newzs.sort(); for (inm=0; inm<newzs.length; inm++) { newz+=’ ‘ + ysuffs[eval(-1 + eval(” + inpn))].substring(1).split(‘ ‘)[eval(” + newzs[inm].split(‘,’)[1])].split(‘,’)[0]; } } return newz + ‘ (if too small ? shows alert box where copy/paste might help)’; } So try the new improved Bridge and 500 game functionality at the changed cards_usefocus.html code behind the “Just Javascript” Memories Card Game or live run with single window (good for mobile) or default live run (for your platform, and if non-mobile it will try child popup windows). Try adding “.0” to number of card players to play (our hybrid) “500” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “500 card game” players (who can affect the game remotely via email)! Try adding “.1” to number of card players to play (our hybrid) “Bridge” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “Bridge card game” players (who
Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials
|
Tagged arguments, array, background, background image, background-position, background-repeat, background-size, bid, bidding, body, bookmarklet, bridge, button, card game, cards, cell, click, codepoint, collaboration, colour, colour coding, comma, console.log, content, content management, copy, createElement, CSS, CSS3, cursor, data uri, deal, defence, delay, delimit, delimiter, design, document.createElement, document.querySelectorAll, document.URL, double click, drag, drag and drop, dropdwon, email, emailee, emoji, entity, event, fallback, filter, focus, font, form, FormData, game, games, global, global variable, head, HTML, html entity, internationalization, Javascript, joker, keyframes, kitty, label, list, localStorage, logic, macOS, Mail, mailto, Mapping, mclick, Memories, name, names, naming, navigation, onions, order, paste, player, popup, preventDefault, programming, progress, progress bar, prompt, quiz, render, rendering, row, score, scoring, screenLeft, screenTop, select, selector, sessionStorage, setTimeout, share, sharing, SMS, sort, String.fromCodePoint, style, styling, subject, submit, suit, SVG, table, tabular, tbody, thead, timing, touch, trick, tutorial, user experience, UX, variable, web browser, web inspector, webpage, window.opener
|
Leave a comment
Just Javascript Bridge Card Game Redouble Tutorial
Onto yesterday’s Just Javascript Bridge Card Game Primer Tutorial, as a “difference”, we add some Bridge card game scoring logic that does not happen with the 500 card game … double and redouble (pseudo) bids (affecting scoring) … representing the first dynamically applicable bidding options in the Bridge card game (and there were none in 500 card game) … “double” bid immediately applied to the (so far) leading bid (by the opposition) applying a factor of 2 to the scoring “redouble” bid immediately applied by the leading bid partner to the “double” bid immediately applied to the (so far) leading bid (by the opposition) applying a factor of 4 to the scoring … all … brought back to the default scoring factor of 1 by any new higher leading bid … as per … var dsdn=” style=’display:none;'”; var rsdn=” style=’display:none;'”; var doublefactor=1; function dr(cb) { if (doublefactor == 2 && card_game.toUpperCase() == ‘BRIDGE’) { return ” + cb + ‘ ‘ + String.fromCodePoint(10133); //➕’; } else if (doublefactor == 4 && card_game.toUpperCase() == ‘BRIDGE’) { return ” + cb + ‘ ‘ + String.fromCodePoint(10133) + ‘ ‘ + String.fromCodePoint(174,65039); //➕ ®️’; } return ” + cb; } function drb(invis) { if (doublefactor == 1) { return ” + invis; } return ” + invis + ‘ x ‘ + doublefactor; } function brd(invis) { var jnvis=eval(doublefactor * eval(” + invis)); return ” + jnvis; } // // used in email creation outdivhtml=outdivhtml.replace(‘</tbody>’, ‘<tr id=trbid><td>Bidding<br>Current Bid: None<td><input type=’ + cbidfound + ‘ name=myanswer value=”pass “></input><input’ + dsdn + ‘ type=’ + cbidfound + ‘ name=myanswer value=”double “></input><input’ + rsdn + ‘ type=’ + cbidfound + ‘ name=myanswer value=”redouble “></input></td></TR></tbody>’); Try the new Bridge game functionality at the changed cards_usefocus.html code behind the “Just Javascript” Memories Card Game or live run with single window (good for mobile) or default live run (for your platform, and if non-mobile it will try child popup windows). Try adding “.0” to number of card players to play (our hybrid) “500” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “500 card game” players (who can affect the game remotely via email)! Try adding “.1” to number of card players to play (our hybrid) “Bridge” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “Bridge card game” players (who can affect the game
Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials
|
Tagged arguments, array, background, background image, background-position, background-repeat, background-size, bid, bidding, body, bookmarklet, bridge, button, card game, cards, cell, click, codepoint, collaboration, colour, colour coding, comma, console.log, content, content management, createElement, CSS, CSS3, cursor, data uri, deal, defence, delay, delimit, delimiter, design, document.createElement, document.querySelectorAll, document.URL, double click, drag, drag and drop, dropdwon, email, emailee, emoji, entity, event, fallback, filter, focus, font, form, FormData, game, games, global, global variable, head, HTML, html entity, internationalization, Javascript, joker, keyframes, kitty, label, list, localStorage, logic, macOS, Mail, mailto, Mapping, mclick, Memories, name, names, naming, navigation, onions, order, player, popup, preventDefault, programming, progress, progress bar, prompt, quiz, render, rendering, row, score, scoring, screenLeft, screenTop, select, selector, sessionStorage, setTimeout, share, sharing, SMS, sort, String.fromCodePoint, style, styling, subject, submit, suit, SVG, table, tabular, tbody, thead, timing, touch, trick, tutorial, user experience, UX, variable, web browser, web inspector, webpage, window.opener
|
Leave a comment
Just Javascript Bridge Card Game Primer Tutorial
“Commonalities and differences” is a strategy for code development. A good enough guinea pig and you can shape it into something “similar, but different”. The 500 card game of recent times has code to shape into a Bridge card game with some provisos … Bridge scoring we have only started … it is far more complicated than 500 card game scoring Bridge is simpler regarding kitties … there are none Bridge is simpler regarding bowers and Jokers … there are none Bridge has 13 tricks per round, while 500 card game has 10 Contract Bridge has teams of 2 x 2 like 500 card game Bridge has bidding like 500 but more options and no Misère … but … like the 500 card game’s Open Misère bid the partner of the winning bidder in Bridge always exposes their hand … and so can you see why the work of yesterday’s Just Javascript Five Hundred Card Game Early Complete Exit Tutorial is such a good guinea pig for a big leg up developing a Bridge Card Game web application “Just Javascript”?! We created a “mapping function” to help … function ulgame(instg) { if (instg.indexOf(‘500 ‘) == 0 && card_game.toLowerCase() == ‘bridge’) { instg=instg.replace(/500\ /g, ‘Bridge ‘); } else if (instg.toLowerCase() == instg && card_game.toLowerCase() == ‘bridge’) { return ‘bridge’; } else if (instg.toUpperCase() == instg && card_game.toLowerCase() == ‘bridge’) { return ‘BRIDGE’; } return instg; } … with a whole lot of “if logic” codelines such as … if (card_game == ulgame(‘500ISH’)) { // 500 2 x 2 or Bridge 2 x 2 logic can go here } … amongst a lot of other web inspector inspired changes to get to the changed cards_usefocus.html code behind the “Just Javascript” Memories Card Game or live run with single window (good for mobile) or default live run (for your platform, and if non-mobile it will try child popup windows). Try adding “.0” to number of card players to play (our hybrid) “500” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “500 card game” players (who can affect the game remotely via email)! Try adding “.1” to number of card players to play (our hybrid) “Bridge” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “Bridge card game” players (who can affect the game remotely via email)! Previous relevant
Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials
|
Tagged arguments, array, background, background image, background-position, background-repeat, background-size, bid, bidding, body, bookmarklet, bridge, button, card game, cards, cell, click, codepoint, collaboration, colour, colour coding, comma, console.log, content, content management, createElement, CSS, CSS3, cursor, data uri, deal, defence, delay, delimit, delimiter, design, document.createElement, document.querySelectorAll, document.URL, double click, drag, drag and drop, dropdwon, email, emailee, emoji, entity, event, fallback, filter, focus, font, form, FormData, game, games, global, global variable, head, HTML, html entity, internationalization, Javascript, joker, keyframes, kitty, label, list, localStorage, logic, macOS, Mail, mailto, Mapping, mclick, Memories, name, names, naming, navigation, onions, order, player, popup, preventDefault, programming, progress, progress bar, prompt, quiz, render, rendering, row, score, scoring, screenLeft, screenTop, select, selector, sessionStorage, setTimeout, share, sharing, SMS, sort, String.fromCodePoint, style, styling, subject, submit, suit, SVG, table, tabular, tbody, thead, timing, touch, trick, tutorial, user experience, UX, variable, web browser, web inspector, webpage, window.opener, wording
|
Leave a comment
Just Javascript Five Hundred Card Game Early Complete Exit Tutorial
Yesterday’s Just Javascript Five Hundred Card Game Early Exit Tutorial talked of … “Early Exit” from a “round” of 500 card game play that contributes to, depending on how competitive you make these things, scoring towards that 500 (or -500 … boo hoo) completion of the “official” version of the game … but … perhaps you have a fierce Player 1 and Player 3 versus Player 2 and Player 4 rivalry going on … no fisticuffs, pleeeeeaaaaassssse … which makes you interested, as far as playing 500 goes with keeping track of that Player 1 and Player 3 versus Player 2 and Player 4 rivalry in terms of scoring, perhaps ongoing, which we can help with, and carry through, if you have that remote email player arrangement In that last case above, we arrange automation of the scoring, in our variable “scoresuffix” … so that … on a player team reaching 500 or the other reaching -500 … in that arrangement with all remote lowercase email addresses defined … we now “chain along” (into our GET ? and & arguments) a new “overallss” of the form … &overallss=[Player 1 and Player 3 score],[Player 2 and Player 4 score] … facilitating … on such a scenario, the “chain along” of the “scoresuffix” becomes … &scoresuffix=0.0,0.0,0.0,0.0 … effectively completing resetting the 500 card game … but … remembering the rivalry, recording the “overallss” situation within the subject lines of the emails that get sent out when a trick is won, this trick triggering an exit from the “round of play” and from “the 500 card game” as nominally understood … as per … function oraass(inss) { if (aass != ”) { if (inss != aass && defstyle.indexOf(inss) != -1) { llj=alterurl(llj); defstyle=defstyle.replace(inss,aass); document.head.innerHTML=bpmore(defstyle); } return aass; } return inss; } function alterurl(inllj) { if (eval(eval(” + jscores[0]) + eval(” + jscores[2])) >= 500) { endgameblurb=’Congratulations, Player 1 and Player 3 for reaching 500. ‘; //Another game?’)) { //lurldone=true; //location.href=lurl(); //jscores=[0,0,0,0]; inllj=inllj.replace(inllj.split(‘scoresuffix=’)[1].split(‘&’)[0], encodeURIComponent(‘0.0,0.0,0.0,0.0’)); overallscores[0]++; inllj=inllj.replace(inllj.split(‘overallss=’)[1].split(‘&’)[0], encodeURIComponent(” + overallscores[0] + ‘,’ + overallscores[1])); endgameblurb+=’ Overall scores Player 1 and Player 3 – ‘ + overallscores[0] + ‘ and Player 2 and Player 4 – ‘ + overallscores[1] + ‘. ‘; } else if (eval(eval(” + jscores[1]) + eval(” + jscores[3])) >= 500) { endgameblurb=’Congratulations, Player 2 and Player 4 for reaching 500. ‘; // Another game?’)) { //lurldone=true; //location.href=lurl(); //jscores=[0,0,0,0]; inllj=inllj.replace(inllj.split(‘scoresuffix=’)[1].split(‘&’)[0], encodeURIComponent(‘0.0,0.0,0.0,0.0’)); overallscores[1]++; inllj=inllj.replace(inllj.split(‘overallss=’)[1].split(‘&’)[0],
Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials
|
Tagged aesthetics, Ajax, alert, animation, arguments, array, background, background image, background-position, background-repeat, background-size, bid, bidding, body, bookmarklet, button, card game, cards, cell, click, codepoint, collaboration, colour, colour coding, comma, console.log, content, content management, createElement, CSS, CSS3, cursor, data uri, deal, defence, delay, delimit, delimiter, design, document.createElement, document.querySelectorAll, document.URL, double click, drag, drag and drop, dropdwon, email, emailee, emoji, entity, event, fallback, filter, focus, font, form, FormData, game, games, global, global variable, head, HTML, html entity, internationalization, Javascript, joker, keyframes, kitty, label, list, localStorage, logic, macOS, Mail, mailto, Mapping, mclick, Memories, name, names, naming, navigation, onions, order, player, popup, preventDefault, programming, progress, progress bar, prompt, quiz, render, rendering, row, score, scoring, screenLeft, screenTop, select, selector, sessionStorage, setTimeout, share, sharing, SMS, sort, String.fromCodePoint, style, styling, subject, submit, suit, SVG, table, tabular, tbody, thead, timing, touch, trick, tutorial, user experience, UX, variable, web browser, web inspector, webpage, window.opener, wording
|
Leave a comment
Just Javascript Five Hundred Card Game Early Exit Tutorial
Onto yesterday’s Just Javascript Five Hundred Card Game Open Misère Progress Bar Tutorial progress, barring setbacks … tee hee … we want to further progress towards a mode of use that goes … 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 … then that’s it, the rest (of the 500 card game) able to be transacted via email (perhaps out and about), with the hoster’s originating webpage displaying the results of a round of tricks and updating scores … the deliberate space allowing cards through that do not follow suit with no quibbling and that hoster having a fully lowercase email address (as do the other players) … allows us to head towards this “only email interaction” mode of play concept. We have not tested screens falling asleep etcetera etcetera etcetera but we are keen to see how far the concept can go. Just as Kenny Rogers wants to … Know when to fold ’em … the work today on top of parsing the host’s more complex entries at that first Javascript prompt window, is to deal with the idea of an Early Exit from a bidded on 500 round when any of … Misère bidder wins a trick ahead of the 10 possible tricks that can be played non-Misère bidder wins the requisite number of tricks ahead of the 10 possible tricks that can be played non-Misère bidder loses the requisite number of tricks ahead of the 10 possible tricks that can be played … where we now step in and call off proceedings as this happens, perhaps. Continuing on as still “Just Javascript” (ie. no “body” element definition) try the changed cards_usefocus.html code behind the “Just Javascript” Memories Card Game or live run with single window (good for mobile) or default live run (for your platform, and if non-mobile it will try child popup windows). Try adding “.0” to number of card players to play (our hybrid) “500” card game, and optionally wait or immediately append a comma separated email/SMS address/number list for your “500 card game” players (who can affect the game remotely via email)! Previous relevant Just Javascript Five Hundred Card Game Open Misère Progress Bar Tutorial is shown below. 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
Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials
|
Tagged aesthetics, Ajax, alert, animation, array, background, background image, background-position, background-repeat, background-size, bid, bidding, body, bookmarklet, button, card game, cards, cell, click, codepoint, collaboration, colour, colour coding, comma, console.log, content, content management, createElement, CSS, CSS3, cursor, data uri, deal, defence, delay, delimit, delimiter, design, document.createElement, document.querySelectorAll, document.URL, double click, drag, drag and drop, dropdwon, email, emailee, emoji, entity, event, fallback, filter, focus, font, form, FormData, game, games, global, global variable, head, HTML, html entity, internationalization, Javascript, joker, keyframes, kitty, label, list, localStorage, logic, macOS, Mail, mailto, Mapping, mclick, Memories, name, names, naming, navigation, onions, order, player, popup, preventDefault, programming, progress, progress bar, prompt, quiz, render, rendering, row, score, scoring, screenLeft, screenTop, select, selector, sessionStorage, setTimeout, share, sharing, SMS, sort, String.fromCodePoint, style, styling, subject, submit, suit, SVG, table, tabular, tbody, thead, timing, touch, trick, tutorial, user experience, UX, variable, web browser, web inspector, webpage, window.opener, wording
|
Leave a comment
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
Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials
|
Tagged aesthetics, Ajax, alert, animation, array, background, background image, background-position, background-repeat, background-size, bid, bidding, body, bookmarklet, button, card game, cards, cell, click, codepoint, collaboration, colour, colour coding, comma, console.log, content, content management, createElement, CSS, CSS3, cursor, data uri, deal, defence, delay, delimit, delimiter, design, document.createElement, document.querySelectorAll, double click, drag, drag and drop, dropdwon, email, emailee, emoji, entity, event, fallback, filter, focus, font, form, FormData, game, games, global, global variable, head, HTML, html entity, internationalization, Javascript, joker, keyframes, kitty, label, list, localStorage, logic, macOS, Mail, mailto, Mapping, mclick, Memories, name, names, naming, navigation, onions, order, player, popup, preventDefault, programming, progress, progress bar, prompt, quiz, render, rendering, row, score, scoring, screenLeft, screenTop, select, selector, sessionStorage, setTimeout, share, sharing, SMS, sort, String.fromCodePoint, style, styling, subject, submit, suit, SVG, table, tabular, tbody, thead, timing, touch, trick, tutorial, user experience, UX, variable, web browser, web inspector, webpage, window.opener, wording
|
Leave a comment
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
Posted in Ajax, eLearning, Event-Driven Programming, Games, Tutorials
|
Tagged aesthetics, Ajax, alert, animation, array, background, background image, background-position, background-repeat, background-size, bid, bidding, body, bookmarklet, button, card game, cards, cell, click, codepoint, collaboration, colour, colour coding, comma, console.log, content, content management, createElement, CSS, CSS3, cursor, data uri, deal, defence, delay, delimit, delimiter, design, document.createElement, document.querySelectorAll, double click, drag, drag and drop, dropdwon, email, emailee, emoji, entity, event, fallback, filter, focus, font, form, FormData, game, games, global, global variable, head, HTML, html entity, internationalization, Javascript, joker, keyframes, kitty, label, list, localStorage, logic, macOS, Mail, mailto, Mapping, mclick, Memories, name, names, naming, navigation, onions, order, player, popup, preventDefault, programming, prompt, quiz, render, rendering, row, score, scoring, screenLeft, screenTop, select, selector, sessionStorage, setTimeout, share, sharing, SMS, sort, String.fromCodePoint, style, styling, subject, submit, suit, SVG, table, tabular, tbody, thead, timing, touch, trick, tutorial, user experience, UX, variable, web browser, web inspector, webpage, window.opener, wording
|
Leave a comment


Thanks. Since then, a Shower Songs project at https://www.rjmprogramming.com.au/HTMLCSS/shower_songs.html is an improvement regarding "Radio Play" on mobile platforms.