English Word Guessing Game Players Tutorial
โœ‚๐Ÿƒ๐Ÿพโ€โ™€๏ธ๐Ÿƒ๐Ÿผโ€โ™‚๏ธ
๐Ÿ“–

English Word Guessing Game Players Tutorial

English Word Guessing Game Players Tutorial

Yesterdayโ€™s English Word Guessing Game Primer Tutorialโ€˜s โ€œEnglish Word Guessing Gameโ€ suited one player. Today, we allow the user to set the number of players to โ€ฆ

  • each nominated player plays within an HTML iframe element with an overall HTML table element within an HTML body element โ€ฆ meaning โ€ฆ
  • until tomorrowโ€™s work, it is โ€œdog eat dogโ€ as to who controls which playerโ€™s textbox has the focus โ€ฆ but โ€ฆ
  • scoring is asynchronous
  • until tomorrowโ€™s work, the use of the tab character to tab out of a textbox clicks the โ€œCorrect?โ€ button to go off to assess that playerโ€™s answer

<?php


$score=0;

$goes=0;

$blurb='';

$dblurb="Score: 0/0";

$totalj=0;

$fortyeight="48";

$fortyeighti="";

$fortyeightj="";

$ob="";

$sh3="";

$aic="Am I Correct?";

if (isset($_GET['fortyeight'])) {

$fortyeight=$_GET['fortyeight'];

$fortyeighti="<input type=hidden name=fortyeight value='" . $fortyeight . "'></input>";

$fortyeightj="&fortyeight=" . $fortyeight;

$aic="Correct?";

$ob=" onblur=\" if (this.value.trim() != '') { document.getElementById('subm').click(); } \" ";

$sh3=" style='display:none;'";

}



if (isset($_GET['numplayers'])) {

$preifs="<html>

<head><title>What Is The English Word - RJM Programming - February, 2022</title>

</head><body style='background-color:yellow;'><table style='width:100%;' border=20><tr><th colspan=2>Player</th></tr><tr><th>Number</th><th>Game</th></tr></table></body></html>";

for ($ih=1; $ih<=$_GET['numplayers']; $ih++) {

$preifs=str_replace("</table>", "<tr><td style=text-align:center;>" . $ih . "</td><td><iframe src='./what_is_the_english_word.php?fortyeight=24' style='width:100%;height:200px;'></iframe></table>", $preifs);

}

echo $preifs;

exit;

}


?>

โ€ฆ the idea of the โ€œfortyeightโ€ code is to reduce the font size in order to fit in more player iframe display into the one shared screen, with the user interfacing code being โ€ฆ

<?php echo โ€


<h3" . $sh3 . ">RJM Programming <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); } \">-</a> February, 2022</h3>


โ€œ; ?>

โ€ฆ for thechanged what_is_the_english_wordโšซphpโ€˜s Englishโœ‚Word Guessing Game.



Previous relevant English Word Guessing Game Primer Tutorial is shown below.

English Word Guessing Game Primer Tutorial

English Word Guessing Game Primer Tutorial

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 โ€ฆ

  • English word game โ€ฆ
  • based on Linux or unix or macOS dictionary list โ€ฆ
  • randomly choosing โ€ฆ
    1. word length between 5 and 12
    2. a letter in word
    3. that letter position in word
  • and a clue, thanks to https://crossword-solver.io/clue/

โ€ฆ basis for our word game, today? Well, itโ€™s just โ€œfirst draftโ€ time for what_is_the_english_wordโšซphpโ€˜s Englishโœ‚Word Guessing Game, but we think you might like to try it?!

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in eLearning, Event-Driven Programming, Games, Tutorials and tagged , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *