From 1f08c9f2000e2449233b66bc1ad30117e44521ef Mon Sep 17 00:00:00 2001 From: "johan.lachenal" Date: Wed, 4 Jan 2023 19:50:47 +0100 Subject: [PATCH 1/9] test --- WEB/Config/Config.php | 2 ++ WEB/Controller/UserController.php | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/WEB/Config/Config.php b/WEB/Config/Config.php index 9cf71d35..2ea79edb 100644 --- a/WEB/Config/Config.php +++ b/WEB/Config/Config.php @@ -35,6 +35,8 @@ $vues['queue'] = 'View/src/pages/Multijoueur/Queue.php'; $vues['enigmePage'] = 'View/src/pages/Enigme/EnigmePage.php'; // Server $server = './server.js'; +$serverAdress = "http://82.165.180.114"; +$port= "3000"; //Error $vues['erreur'] = 'View/src/pages/Erreur.php'; diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index c2c0e7af..ebc437f6 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -109,14 +109,16 @@ class UserController public function goToQueue() { try { - global $rep, $vues, $error; + global $rep, $vues, $error; //$serverAdress,$port; require($rep . $vues['queue']); $model = new UserModel(); $model->addToQueue(); - $userGroup = $model->findUserGroup(); - $io = require '/usr/local/lib/node_modules/socket.io-client'; - $socket = $io('http://82.165.180.114:3000'); - $io->to($userGroup)->emit("launchGame"); + $userGroup = $model->findUserGroup();/*.$serverAdress.$port*/ + echo '' } catch (Exception $e) { $error = $e->getMessage(); require($rep . $vues['erreur']); From 67f2486c519fd91c9573cfda80ff577597367e96 Mon Sep 17 00:00:00 2001 From: "johan.lachenal" Date: Wed, 4 Jan 2023 19:52:53 +0100 Subject: [PATCH 2/9] ; --- WEB/Controller/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index ebc437f6..c22977df 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -118,7 +118,7 @@ class UserController const socketIO = require(module +"socket.io"); io = socketIO("http://82.165.180.114:3000") $io.to($userGroup).emit("launchGame"); - ' + '; } catch (Exception $e) { $error = $e->getMessage(); require($rep . $vues['erreur']); From 0f28e920eff3a5bd6acc61fed80341d84d4df879 Mon Sep 17 00:00:00 2001 From: "johan.lachenal" Date: Wed, 4 Jan 2023 19:56:48 +0100 Subject: [PATCH 3/9] " --- WEB/Controller/UserController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index c22977df..b408cdc9 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -115,6 +115,7 @@ class UserController $model->addToQueue(); $userGroup = $model->findUserGroup();/*.$serverAdress.$port*/ echo ''; } catch (Exception $e) { $error = $e->getMessage(); From 5c1a86d7869b42528ec165eb869cdb67483f364b Mon Sep 17 00:00:00 2001 From: "johan.lachenal" Date: Wed, 4 Jan 2023 20:36:39 +0100 Subject: [PATCH 5/9] test --- WEB/Controller/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index dce65dfc..13d60038 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -115,7 +115,7 @@ class UserController $model->addToQueue(); $userGroup = $model->findUserGroup();/*.$serverAdress.$port*/ echo ' - '; From dce204ab8136a9d9c97576dec2079a9a8a5b0e9b Mon Sep 17 00:00:00 2001 From: "johan.lachenal" Date: Wed, 4 Jan 2023 20:40:58 +0100 Subject: [PATCH 6/9] test --- WEB/Controller/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index 13d60038..90fc3be4 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -115,7 +115,7 @@ class UserController $model->addToQueue(); $userGroup = $model->findUserGroup();/*.$serverAdress.$port*/ echo ' - '; From 9e5af16f57bc6cb1f3f5f9086929bfc18bbc916a Mon Sep 17 00:00:00 2001 From: "johan.lachenal" Date: Wed, 4 Jan 2023 20:41:46 +0100 Subject: [PATCH 7/9] s --- WEB/Controller/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index 90fc3be4..13d60038 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -115,7 +115,7 @@ class UserController $model->addToQueue(); $userGroup = $model->findUserGroup();/*.$serverAdress.$port*/ echo ' - '; From ea1e4ee311977734c2345e610d13c47385ac4bfc Mon Sep 17 00:00:00 2001 From: "johan.lachenal" Date: Wed, 4 Jan 2023 20:54:38 +0100 Subject: [PATCH 8/9] test --- WEB/Controller/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index 13d60038..dce65dfc 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -115,7 +115,7 @@ class UserController $model->addToQueue(); $userGroup = $model->findUserGroup();/*.$serverAdress.$port*/ echo ' - '; From 0e21ca8cba1f18342c3e530eff4e9f6485b4045b Mon Sep 17 00:00:00 2001 From: "johan.lachenal" Date: Wed, 4 Jan 2023 21:01:17 +0100 Subject: [PATCH 9/9] test --- WEB/Controller/UserController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WEB/Controller/UserController.php b/WEB/Controller/UserController.php index dce65dfc..13d60038 100644 --- a/WEB/Controller/UserController.php +++ b/WEB/Controller/UserController.php @@ -115,7 +115,7 @@ class UserController $model->addToQueue(); $userGroup = $model->findUserGroup();/*.$serverAdress.$port*/ echo ' - ';