Merge branch 'master' of https://codefirst.iut.uca.fr/git/nathan.boileau/Scripted
continuous-integration/drone/push Build is passing Details

ServeurDeTest
Noé GARNIER 2 years ago
commit 18c452235b

@ -10,6 +10,7 @@ class UserController
global $dsn, $rep, $vues, $error;
$model = new UserModel();
$action = $_REQUEST['action'];
//register_event_handler('add_to_queue',array($this,"onAddToQueue"));
switch ($action) {
case NULL:
$model->goToHome();
@ -60,4 +61,13 @@ class UserController
require($rep . $vues['erreur']);
}
}
public function onAddToQueue(){
$model=new UserModel;
$model->AddUserToQueueEvent();
$this->goToMulti();
}
/*public function goToMulti(){
}*/
}

@ -127,15 +127,8 @@ class UserModel
}
public function addToQueue(){
echo '1';
$userGroup=$this->utilisateur_gateway->findUsersInQueue();
if($this->utilisateur_gateway->isAlreadyInqueue($_SESSION['utilisateur']))
{
if ($this->utilisateur_gateway->queueFilled())
{
echo "Partie is launched";
$this->utilisateur_gateway->launchGame($_SESSION['utilisateur']);
} else
$this->attente();
return;
}
echo '2';
@ -156,16 +149,21 @@ class UserModel
}
echo '8';
$this->utilisateur_gateway->addToQueue($_SESSION['utilisateur'],$partie);
echo '9';
if ($this->utilisateur_gateway->queueFilled())
$userGroup=$this->utilisateur_gateway->findUsersInQueue();
//trigger_event('add_to_queue',$userGroup);
}
<<<<<<< HEAD
public function AddUserToQueueEvent(){
$userGroup=$this->utilisateur_gateway->findUsersInQueue();
if($userGroup.count()>=4)
{
echo "Partie is launched";
trigger_event('queue_filled',$user_group,$partie,$user_group);
$this->utilisateur_gateway->launchGame($_SESSION['utilisateur']);
$this->utilisateur_gateway->launchGame();
}
$this->attente();
}
=======
>>>>>>> 146a4b62fc5bc2340e9c08c07650a6efb799c3fb
public function logout()
{
$_SESSION['role'] = 'visitor';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 MiB

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 KiB

@ -13,10 +13,6 @@ body {
color: white;
scroll-behavior: smooth;
height: 100vh;
background-position: center center;
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
background-color: #050E15;
}

@ -4,19 +4,26 @@
color: white;
scroll-behavior: smooth;
height: 100vh;
background-image: radial-gradient(
circle,
#312c42,
#2e2a3d,
#2a2738,
#272434,
#24222f,
#22202c,
#1f1f29,
#1d1d26,
#1b1b23,
#191a21,
#17181e,
#15161c
);
background-image: url("../../assets/img/ImgMain.png");
background-position: center center;
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
background-color: #000;
}
#imgMain {
background-image: url("../../assets/img/SecondMainBack.jpg");
background-position: center center;
background-attachment: fixed;
background-repeat: no-repeat;
background-size: cover;
display: block;
margin: auto;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 85%;
height: 70%;
}

@ -112,7 +112,7 @@ function check() {
/**
* It gets all the elements with the class name "help" and sets their display property to "flex".
* It gets all the elements with the class name "help" and sets their display property to "block".
*/
function displayHelp() {
var help = document.getElementsByClassName("help");

@ -23,8 +23,10 @@
<link rel="stylesheet" href="../CSS/Main2.css">
</head>
<body>
<div class="container align-middle m-auto d-flex" style="background-image: url('../../assets/img/ImgMain.png')">
<div>
<div class="container-fluid" id="imgMain">
<i class="bi bi-list-nested" style="color:white; height:100px; width: 100px;"></i>
</div>
</div>
</body>
</html>

16
package-lock.json generated

@ -6,7 +6,8 @@
"": {
"dependencies": {
"bootstrap": "^5.2.2",
"bootstrap-icons": "^1.10.2"
"bootstrap-icons": "^1.10.2",
"events": "^3.3.0"
}
},
"node_modules/@popperjs/core": {
@ -41,6 +42,14 @@
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.2.tgz",
"integrity": "sha512-PTPYadRn1AMGr+QTSxe4ZCc+Wzv9DGZxbi3lNse/dajqV31n2/wl/7NX78ZpkvFgRNmH4ogdIQPQmxAfhEV6nA=="
},
"node_modules/events": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
"engines": {
"node": ">=0.8.x"
}
}
},
"dependencies": {
@ -60,6 +69,11 @@
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/bootstrap-icons/-/bootstrap-icons-1.10.2.tgz",
"integrity": "sha512-PTPYadRn1AMGr+QTSxe4ZCc+Wzv9DGZxbi3lNse/dajqV31n2/wl/7NX78ZpkvFgRNmH4ogdIQPQmxAfhEV6nA=="
},
"events": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q=="
}
}
}

@ -1,6 +1,7 @@
{
"dependencies": {
"bootstrap": "^5.2.2",
"bootstrap-icons": "^1.10.2"
"bootstrap-icons": "^1.10.2",
"events": "^3.3.0"
}
}

Loading…
Cancel
Save