{"id":54918,"date":"2022-02-15T03:01:50","date_gmt":"2022-02-14T17:01:50","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=54918"},"modified":"2022-02-15T17:38:46","modified_gmt":"2022-02-15T07:38:46","slug":"english-word-guessing-game-players-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/english-word-guessing-game-players-tutorial\/","title":{"rendered":"English Word Guessing Game Players Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/what_is_the_english_word.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"English Word Guessing Game Players Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/what_is_the_english_word_oldplayers.jpg\" title=\"English Word Guessing Game Players Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">English Word Guessing Game Players Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='English Word Guessing Game Primer Tutorial' href='#ewggpt'>English Word Guessing Game Primer Tutorial<\/a>&#8216;s &#8220;English Word Guessing Game&#8221; suited one player.   Today, we allow the user to set the number of players to &#8230;<\/p>\n<ul>\n<li>each nominated player plays within an HTML iframe element with an overall HTML table element within an HTML body element &#8230; meaning &#8230;<\/li>\n<li>until tomorrow&#8217;s work, it is &#8220;dog eat dog&#8221; as to who controls which player&#8217;s textbox has the focus &#8230; but &#8230;<\/li>\n<li>scoring is asynchronous<\/li>\n<li>until tomorrow&#8217;s work, the use of the tab character to tab out of a textbox clicks the &#8220;Correct?&#8221; button to go off to assess that player&#8217;s answer<\/li>\n<\/ul>\n<p>&lt;?php<br \/>\n<code><br \/>\n$score=0;<br \/>\n$goes=0;<br \/>\n$blurb='';<br \/>\n$dblurb=\"Score: 0\/0\";<br \/>\n$totalj=0;<br \/>\n$fortyeight=\"48\";<br \/>\n$fortyeighti=\"\";<br \/>\n$fortyeightj=\"\";<br \/>\n$ob=\"\";<br \/>\n$sh3=\"\";<br \/>\n$aic=\"Am I Correct?\";<br \/>\nif (isset($_GET['fortyeight'])) {<br \/>\n  $fortyeight=$_GET['fortyeight'];<br \/>\n  $fortyeighti=\"&lt;input type=hidden name=fortyeight value='\" . $fortyeight . \"'&gt;&lt;\/input&gt;\";<br \/>\n  $fortyeightj=\"&fortyeight=\" . $fortyeight;<br \/>\n  $aic=\"Correct?\";<br \/>\n  $ob=\" onblur=\\\" if (this.value.trim() != '') { document.getElementById('subm').click(); } \\\" \";<br \/>\n  $sh3=\" style='display:none;'\";<br \/>\n}<br \/>\n<br \/>\nif (isset($_GET['numplayers'])) {<br \/>\n  $preifs=\"&lt;html&gt;<br \/>\n&lt;head&gt;&lt;title&gt;What Is The English Word - RJM Programming - February, 2022&lt;\/title&gt;<br \/>\n&lt;\/head&gt;&lt;body style='background-color:yellow;'&gt;&lt;table style='width:100%;' border=20&gt;&lt;tr&gt;&lt;th colspan=2&gt;Player&lt;\/th&gt;&lt;\/tr&gt;&lt;tr&gt;&lt;th&gt;Number&lt;\/th&gt;&lt;th&gt;Game&lt;\/th&gt;&lt;\/tr&gt;&lt;\/table&gt;&lt;\/body&gt;&lt;\/html&gt;\";<br \/>\n  for ($ih=1; $ih&lt;=$_GET['numplayers']; $ih++) {<br \/>\n     $preifs=str_replace(\"&lt;\/table&gt;\", \"&lt;tr&gt;&lt;td style=text-align:center;&gt;\" . $ih . \"&lt;\/td&gt;&lt;td&gt;&lt;iframe src='.\/what_is_the_english_word.php?fortyeight=24' style='width:100%;height:200px;'&gt;&lt;\/iframe&gt;&lt;\/table&gt;\", $preifs);<br \/>\n  }<br \/>\n  echo $preifs;<br \/>\n  exit;<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; the idea of the &#8220;fortyeight&#8221; code is to reduce the font size in order to fit in more player iframe display into the one shared screen, with <font color=blue>the user interfacing code<\/font> being &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n&lt;h3\" . $sh3 . \"&gt;RJM Programming <font color=blue>&lt;a title='How many players?' style='cursor:pointer;text-decoration:underline;' onclick=\\\" var hm=prompt('How many players?','1'); if (hm == null) { hm=''; } if (hm.trim().replace('1','') != '') { location.href=document.URL.split('?')[0].split('#')[0] + '?fortyeight=24&numplayers=' + encodeURIComponent(hm);  } \\\"&gt;<\/font>-<font color=blue>&lt;\/a&gt;<\/font> February, 2022&lt;\/h3&gt;<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; for <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/what_is_the_english_word.php-GETME\" title=\"what_is_the_english_word.php\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/what_is_the_english_word.php-GETME\" title=\"what_is_the_english_word.php\">what_is_the_english_word.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/what_is_the_english_word.php\" title=\"Click picture\">English Word Guessing Game<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/english-word-guessing-game-players-tutorial\/'>English Word Guessing Game Players Tutorial<\/a>.<\/p-->\n<hr>\n<p id='ewggpt'>Previous relevant <a target=_blank title='English Word Guessing Game Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/english-word-guessing-game-primer-tutorial\/'>English Word Guessing Game Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/what_is_the_english_word.php\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"English Word Guessing Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/what_is_the_english_word.jpg\" title=\"English Word Guessing Game Primer Tutorial\"  style=\"float:left;\"   \/><\/a><p class=\"wp-caption-text\">English Word Guessing Game Primer Tutorial<\/p><\/div>\n<p>Ever so simple!  Is that what you want in a Word Game?   We like that, but we also like to learn words that might be new to us.  How about a &#8230;<\/p>\n<ul>\n<li>English word game &#8230;<\/li>\n<li>based on Linux or unix or macOS dictionary list &#8230;<\/li>\n<li>randomly choosing &#8230;\n<ol>\n<li>word length between 5 and 12<\/li>\n<li>a letter in word<\/li>\n<li>that letter position in word<\/li>\n<\/ol>\n<\/li>\n<li>and a clue, thanks to <a target=_blank title='Thanks' href='http:\/\/crossword-solver.io\/clue\/'>https:\/\/crossword-solver.io\/clue\/<\/a><\/li>\n<\/ul>\n<p> &#8230; basis for our word game, today?  Well, it&#8217;s just &#8220;first draft&#8221; time for <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/what_is_the_english_word.php_GETME\" title=\"what_is_the_english_word.php\">what_is_the_english_word.php<\/a>&#8216;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/what_is_the_english_word.php\" title=\"Click picture\">English Word Guessing Game<\/a>, but we think you might like to try it?!<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d54888' onclick='var dv=document.getElementById(\"d54888\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/word\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54888' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d54918' onclick='var dv=document.getElementById(\"d54918\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/players\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d54918' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday&#8217;s English Word Guessing Game Primer Tutorial&#8216;s &#8220;English Word Guessing Game&#8221; suited one player. Today, we allow the user to set the number of players to &#8230; each nominated player plays within an HTML iframe element with an overall HTML &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/english-word-guessing-game-players-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,15,37],"tags":[326,388,476,587,932,952,3908,997,1761,1022,1238,1319,1452,1453],"class_list":["post-54918","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-games","category-tutorials","tag-dictionary","tag-english","tag-game","tag-iframe","tag-php","tag-player","tag-players","tag-programming","tag-prompt","tag-quiz","tag-table","tag-tutorial","tag-word","tag-word-game"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54918"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=54918"}],"version-history":[{"count":4,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54918\/revisions"}],"predecessor-version":[{"id":54922,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/54918\/revisions\/54922"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=54918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=54918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=54918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}