2,3c2,3 < // colouring_in_was_numbers_guessing_game.php < // April, 2024 --- > // numbers_guessing_game.php > // August, 2023 5,6c5 < // Using experimental_drag_and_drop.htm for Colouring In web application < // Note use of input type=color id=ddcolour --- > // Using experimental_drag_and_drop.htm for Numbers Guessing game 8c7 < $across=99; --- > $across=9; 424,432d422 < if ($across > 9) { < $waswikistuff=$wikistuff; < $wikistuffs=explode("\n", $wikistuff); < while (sizeof($wikistuffs) < ($across * $across)) { < $wikistuff.=$waswikistuff; < $wikistuffs=explode("\n", $wikistuff); < } < } < 472c462 < $callbackurl='./colouring_in_was_numbers_guessing_game.php'; --- > $callbackurl='./numbers_guessing_game.php'; 476,480c466,470 < //if (isset($_GET['notice'])) { < //$templategame=str_replace('>-', '>-+', $templategame); < //} else { < //$templategame=str_replace('>-', '>+-', $templategame); < //} --- > if (isset($_GET['notice'])) { > $templategame=str_replace('>-', '>-+', $templategame); > } else { > $templategame=str_replace('>-', '>+-', $templategame); > } 482,494c472,479 < $rownum=$across; < $tdnum=($across * $across); < if (1 == 5) { < for ($ijk=(1 + $across); $ijk<=$thnum; $ijk++) { < if (($ijk % $across) == 1) { < $rownum=(1 + ((-1 + $ijk) / $across)); < $arow='' . $ijk . ''; < } else if (($ijk % $across) == 0) { < $arow=str_replace('', '' . $ijk . '', $arow); < $templategame=str_replace('', $arow . '', $templategame); < $arow=''; < } else if (($ijk % $across) > 1) { < $arow=str_replace('', '' . $ijk . '', $arow); --- > $rownum=4; > $tdnum=99; > for ($ijk=10; $ijk<=$tdnum; $ijk++) { > if (($ijk % 3) == 1) { > $rownum=(1 + ((-1 + $ijk) / 3)); > $arow='' . $ijk . ''; > } else if (($ijk % 3) == 0) { > $arow=str_replace('', '' . $ijk . '', $arow); 496a482,483 > } else { > $arow=str_replace('', '' . $ijk . '', $arow); 501d487 < } 503,504c489 < if ($across != $across || 1 == 1) { < $across=99; --- > if ($across != 3 && 1 == 1) { 508d492 < if (strpos($templategame, '') !== false) { 510c494,499 < $templategame=str_replace($wasih, '', $templategame); --- > $origih=$wasih; > $rowas=explode("", $wasih); > for ($irws=1; $irws if (strlen($rowas[$irws]) > 3 && strpos(substr(str_replace("\n","",$rowas[$irws]),0,2),' $wasih=str_replace($rowas[(-1 + $irws)] . '', $rowas[(-1 + $irws)] . '', $wasih); > } 512,514c501,505 < if (strpos($templategame, '

') !== false) { < $wasih='#f0f0f0;">' . explode('#f0f0f0;">', explode("

", $templategame)[0])[-1 + sizeof(explode('#f0f0f0;">', explode("

", $templategame)[0]))] . "

"; < $templategame=str_replace($wasih, '#f0f0f0;width:20px;height:25px;">🖌

', $templategame); --- > $rowas=explode(" for ($irws=2; $irws if (strlen($rowas[$irws]) > 3) { > $wasih=str_replace('', $rowas[$irws])[0] . '>', '-' . '->', $rowas[$irws]), $wasih); > } 516,537c507,517 < $wasih='
", explode('
"; < $origih=$wasih; < < $newih="
"; < $cacross='' . $across; < $iacross=strlen($cacross); < $thisid=''; < $rowsofar=''; < $thistdid='td'; < $thistdidsuffix=''; < $ttcnt=1; < < for ($thisrow=1; $thisrow<=$across; $thisrow++) { < $cthisrow='0000000000' . $thisrow; < $rowsofar=''; < $thistdid='td' . substr($cthisrow, -$iacross, $iacross) . '_'; < for ($thiscol=1; $thiscol<=$across; $thiscol++) { < $cthiscol='0000000000' . $thiscol; < $thistdidsuffix='' . substr($cthiscol, -$iacross, $iacross) . ''; < $rowsofar=str_replace('>', '>', $rowsofar); < } < $newih=str_replace('', $rowsofar . '', $newih); --- > //file_put_contents('xxxx.html', str_replace($origih, $wasih, $templategame)); > $rowas=explode("", $wasih); > for ($irws=0; $irws if (((1 + $irws) % $across) == 0) { > $sofartd.=$rowas[$irws] . ''; > $wasih=str_replace($sofartd, $sofartd . '', $wasih); > $sofartd=''; > $two++; > } else { > $sofartd.=$rowas[$irws] . ''; > } 539,542d518 < < //echo strlen($newih); < //exit; < 544,547c520 < $templategame=str_replace($origih, str_replace('Drop Zone', 'Canvas Below    ', $origih) . $newih, $templategame); < $templategame=str_replace('1px dotted green', '0px dotted transparent', $templategame); < $justforcolouringin=" var rectis=document.getElementById('mytable').getBoundingClientRect(); document.getElementById('mytable').width='' + rectis.height + 'px'; setTimeout(function(){ document.getElementsByTagName('h3')[0].style.display='none'; document.getElementsByTagName('h4')[0].style.display='none'; document.getElementsByTagName('h3')[1].style.display='none'; }, 7000); "; < $templategame=str_replace(' $templategame=str_replace($origih, $wasih, $templategame); 552c525 < $templategame=str_replace('>Game<', '>Colouring In Numbers Guessing Game Game ... drag pen over canvas to colour in<', $templategame); --- > $templategame=str_replace('>Game<', '>Numbers Guessing Game Game ... drag to matching correct answer to score<', $templategame); 570d542 < if (1 == 6) { 578d549 < } 582d552 < if (1 == 6) { 589d558 < }