|
|
@ -251,12 +251,14 @@ class PartieGateway
|
|
|
|
throw new Exception("La partie est pleine");
|
|
|
|
throw new Exception("La partie est pleine");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($player + 1 == $playerNumberPerGame) {
|
|
|
|
if ($player + 1 == $playerNumberPerGame) {
|
|
|
|
|
|
|
|
echo "La partie est pleine";
|
|
|
|
$query = "INSERT INTO Participer VALUES (:partie,:utilisateur,1)";
|
|
|
|
$query = "INSERT INTO Participer VALUES (:partie,:utilisateur,1)";
|
|
|
|
$this->con->executeQuery($query, array(
|
|
|
|
$this->con->executeQuery($query, array(
|
|
|
|
"partie" => array($idPartie, SQLITE3_INTEGER),
|
|
|
|
"partie" => array($idPartie, SQLITE3_INTEGER),
|
|
|
|
"utilisateur" => array($mailUtilisateur, SQLITE3_TEXT)));
|
|
|
|
"utilisateur" => array($mailUtilisateur, SQLITE3_TEXT)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
echo "La partie n'est pas pleine";
|
|
|
|
$query = "INSERT INTO Participer VALUES (:partie,:utilisateur,0)";
|
|
|
|
$query = "INSERT INTO Participer VALUES (:partie,:utilisateur,0)";
|
|
|
|
$this->con->executeQuery($query, array(
|
|
|
|
$this->con->executeQuery($query, array(
|
|
|
|
"partie" => array($idPartie, SQLITE3_INTEGER),
|
|
|
|
"partie" => array($idPartie, SQLITE3_INTEGER),
|
|
|
|