* @copyright 2014 Bartolomé Sintes Marco * @license http://www.gnu.org/licenses/agpl.txt AGPL 3 or later * @version 2014-10-28 * @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 . */ ?> Lights Out de una fila. Imágenes. Ejercicios. PHP. Bartolomé Sintes Marco. www.mclibre.org

Lights Out de una fila

No ha indicado su jugada correctamente.

\n"; print "\n"; } elseif ($juega < 1 || $juega > $total) { print "

No ha indicado su jugada correctamente.

\n"; print "\n"; } else { $juegaOk = true; $partida[0] = 0; $partida[$total + 1] = 0; } if ($juegaOk) { if ($juega != "") { $partida[$juega - 1] = (int)!(bool)$partida[$juega - 1]; $partida[$juega ] = (int)!(bool)$partida[$juega ]; $partida[$juega + 1] = (int)!(bool)$partida[$juega + 1]; } $todasBlancas = true; $todasNegras = true; for ($i = 1; $i <= $total; $i++) { if ($partida[$i] == 0) { $todasBlancas = false; } else { $todasNegras = false; } } if ($todasBlancas || $todasNegras) { print "

¡Felicidades! Ha conseguido el objetivo.

\n"; print "\n"; } else { print "

Haga clic en una ficha para cambiar su color y el de las fichas vecinas. "; print "El objetivo del juego es dejar todas las fichas del mismo color.

\n"; print "\n"; } print "
\n"; print " \n"; print " \n"; for ($i = 1; $i <= $total; $i++) { print " \n"; } else { print "\"Ficha\"\n"; } } print " \n"; print "
\n"; print "\n"; print "

\n"; for ($i = 1; $i <= $total; $i++) { print " \n"; } print "

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

\n"; print "
\n"; } else { print "
\n"; print "

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