* @copyright 2021 Bartolomé Sintes Marco * @license http://www.gnu.org/licenses/agpl.txt AGPL 3 or later * @version 2021-11-23 * @link https://www.mclibre.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ // Se accede a la sesión session_name("minijuegos-3-5"); session_start(); if (!isset($_SESSION["mensaje"])) { $_SESSION["dado"] = rand(1, 6); $_SESSION["r"] = 0; $_SESSION["g"] = 0; $_SESSION["b"] = 0; $_SESSION["mensaje"] = ""; } ?> Mueve fichas. Minijuegos (3). Sesiones. Ejercicios. PHP. Bartolomé Sintes Marco. www.mclibre.org

Mueve fichas

El objetivo del juego es mover las tres fichas hasta la casilla de la derecha. Elija en cada turno una ficha y se desplazará hacia la meta tantas casillas como marque el dado.

Movimiento: \"$_SESSION[dado]\"

\n"; print "\n"; print " \n"; print " \n"; for ($i = 0; $i < 8; $i++) { if ($i == $_SESSION["r"]) { print " \n"; } else { print " \n"; } } print " \n"; print " \n"; for ($i = 0; $i < 8; $i++) { if ($i == $_SESSION["g"]) { print " \n"; } else { print " \n"; } } print " \n"; print " \n"; print " \n"; for ($i = 0; $i < 8; $i++) { if ($i == $_SESSION["b"]) { print " \n"; } else { print " \n"; } } print " \n"; print "
\n"; print " \n"; print "
\n"; print " \n"; print "
\n"; print " \n"; print "
\n"; print "

\n"; if ($_SESSION["mensaje"] != "") { print "

$_SESSION[mensaje]

\n"; print "\n"; } print " \n"; print "

\n"; print "\n"; ?>