Este es el codigo, ya nose como arreglarlo!
Cita:
<?php
//include the required files
include('partida.php');
include('colgado.php');
//this will keep the game data as they refresh the page
session_start();
//if they haven't started a game yet let's load one
if (!$_SESSION['partida']['colgado']){
$_SESSION['partida']['colgado'] = new colgado();
}
?>
<html>
<head>
<title>Colgado</title>
</head>
<body>
<div id="content">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<h2>Juguemos al Colgado!</h2>
<?php
$_SESSION['partida']['colgado'] = jugarPartida(isset($_POST));
?>
</form>
</div>
</body>
</html>
//include the required files
include('partida.php');
include('colgado.php');
//this will keep the game data as they refresh the page
session_start();
//if they haven't started a game yet let's load one
if (!$_SESSION['partida']['colgado']){
$_SESSION['partida']['colgado'] = new colgado();
}
?>
<html>
<head>
<title>Colgado</title>
</head>
<body>
<div id="content">
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<h2>Juguemos al Colgado!</h2>
<?php
$_SESSION['partida']['colgado'] = jugarPartida(isset($_POST));
?>
</form>
</div>
</body>
</html>
Cita:
Gracias! function jugarPartida($letra){
if (isset($_POST['nuevaPartida']) || empty($this->listaPalabras)){
$this->nuevaPartida();
}
if ((!$this->hasPerdido()) && isset($_POST['letra'])){
echo $this->letrasAdivinadas(isset($_POST['letra']));
}
$this->mostrarJuego();
}
if (isset($_POST['nuevaPartida']) || empty($this->listaPalabras)){
$this->nuevaPartida();
}
if ((!$this->hasPerdido()) && isset($_POST['letra'])){
echo $this->letrasAdivinadas(isset($_POST['letra']));
}
$this->mostrarJuego();
}