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 e3e5b26de6

@ -5,7 +5,7 @@ include_once "Enigme.php";
class Partie class Partie
{ {
private string $idPartie; private string $idPartie;
private $datePartie; private DateTime $datePartie;
private array $listeEnigme; private array $listeEnigme;
/** /**
@ -15,7 +15,7 @@ class Partie
public function __construct(string $idPartie, array $listeEnigme) public function __construct(string $idPartie, array $listeEnigme)
{ {
$this->idPartie = $idPartie; $this->idPartie = $idPartie;
$this->datePartie = getdate(); $this->datePartie = new DateTime();
$this->$listeEnigme = $listeEnigme; $this->$listeEnigme = $listeEnigme;
} }
@ -38,7 +38,7 @@ class Partie
/** /**
* @return array * @return array
*/ */
public function getDatePartie(): array public function getDatePartie(): dateTime
{ {
return $this->datePartie; return $this->datePartie;
} }
@ -46,7 +46,7 @@ class Partie
/** /**
* @param array $datePartie * @param array $datePartie
*/ */
public function setDatePartie(array $datePartie): void public function setDatePartie(dateTime $datePartie): void
{ {
$this->datePartie = $datePartie; $this->datePartie = $datePartie;
} }

@ -1,6 +1,6 @@
-- ALTER USER 'root'@'localhost' IDENTIFIED BY 'p'; -- ALTER USER 'root'@'localhost' IDENTIFIED BY 'p';
-- CREATE scripted; -- CREATE DATABASE scripted;
-- USE scripted; -- USE scripted;
DROP TABLE Contenir; DROP TABLE Contenir;
@ -49,11 +49,12 @@ indexEnigme numeric UNIQUE,
PRIMARY KEY(joueur, enigme) PRIMARY KEY(joueur, enigme)
); );
CREATE TABLE ResoudreEnMulti( CREATE TABLE PasserEnMulti(
joueur varchar(50) REFERENCES Joueur(email), joueur varchar(50) REFERENCES Joueur(email),
enigme char(5) REFERENCES Enigme(id), enigme char(5) REFERENCES Enigme(id),
partie char(5) REFERENCES Partie(id), partie char(5) REFERENCES Partie(id),
indexEnigme numeric UNIQUE, passer bool NOT NULL,
points numeric NOT NULL,
temps time, temps time,
PRIMARY KEY(joueur, enigme, partie) PRIMARY KEY(joueur, enigme, partie)
); );
@ -73,5 +74,5 @@ CREATE TABLE Participer(
CREATE TABLE Gerer( CREATE TABLE Gerer(
admin varchar(50) REFERENCES Admin(id), admin varchar(50) REFERENCES Admin(id),
enigme int REFERENCES Enigme(id), enigme int REFERENCES Enigme(id)
) );

@ -17,7 +17,7 @@ hiddenElements.forEach((element) => observer.observe(element));
const fox = document.querySelector(".moving-fox"); const fox = document.querySelector(".moving-fox");
window.addEventListener("scroll", () => { window.addEventListener("scroll", () => {
const scrollValue = window.scrollY - 500; const scrollValue = window.scrollY - 600;
fox.style.top = `${scrollValue / 1.2}px`; fox.style.top = `${scrollValue / 1.2}px`;
fox.style.opacity = `${window.scrollY / 500}`; fox.style.opacity = `${window.scrollY / 500}`;
}); });

@ -1,4 +1,72 @@
window.onload = function () { window.onload = function () {
/*data = [{
type: "line",
xValueFormatString: "Pierre",
dataPoints: [
{ x: 0, y: 0 },
{ x: 1, y: 50 },
{ x: 2, y: 100 },
{ x: 3, y: 150 },
{ x: 4, y: 150 },
{ x: 5, y: 200 },
]
},
{
type: "line",
xValueFormatString: "Noe",
dataPoints: [
{ x: 0, y: 0 },
{ x: 1, y: 100 },
{ x: 2, y: 100 },
{ x: 3, y: 200 },
{ x: 4, y: 250 },
{ x: 5, y: 300 },
]
},
{
type: "line",
xValueFormatString: "Nathan",
dataPoints: [
{ x: 0, y: 0 },
{ x: 1, y: 75 },
{ x: 2, y: 100 },
{ x: 3, y: 150 },
{ x: 4, y: 200 },
{ x: 5, y: 250 },
]
}]*/
v1 = {
type: "line",
xValueFormatString: "Pierre",
dataPoints: [
{ x: 0, y: 0 },
{ x: 1, y: 50 },
{ x: 2, y: 100 },
{ x: 3, y: 150 },
{ x: 4, y: 150 },
{ x: 5, y: 200 },
]
}
v2 = {
type: "line",
xValueFormatString: "Noe",
dataPoints: [
{ x: 0, y: 0 },
{ x: 1, y: 100 },
{ x: 2, y: 100 },
{ x: 3, y: 200 },
{ x: 4, y: 250 },
{ x: 5, y: 300 },
]
}
data = []
data.push(v1);
data.push(v2);
console.log(data);
var chart = new CanvasJS.Chart("chartContainer", { var chart = new CanvasJS.Chart("chartContainer", {
animationEnabled: true, animationEnabled: true,
zoomEnabled: true, zoomEnabled: true,
@ -7,7 +75,7 @@ window.onload = function () {
text: "Score" text: "Score"
}, },
axisX: { axisX: {
title: "Enigme", title: "Temps",
valueFormatString: "####", valueFormatString: "####",
interval: 1 interval: 1
}, },
@ -22,43 +90,7 @@ window.onload = function () {
verticalAlign: "top", verticalAlign: "top",
fontSize: 16, fontSize: 16,
}, },
data: [{ data
type: "line",
xValueFormatString: "Pierre",
dataPoints: [
{ x: 0, y: 0 },
{ x: 1, y: 50 },
{ x: 2, y: 100 },
{ x: 3, y: 150 },
{ x: 4, y: 150 },
{ x: 5, y: 200 },
]
},
{
type: "line",
xValueFormatString: "Noe",
dataPoints: [
{ x: 0, y: 0 },
{ x: 1, y: 100 },
{ x: 2, y: 100 },
{ x: 3, y: 200 },
{ x: 4, y: 250 },
{ x: 5, y: 300 },
]
},
{
type: "line",
xValueFormatString: "Nathan",
dataPoints: [
{ x: 0, y: 0 },
{ x: 1, y: 75 },
{ x: 2, y: 100 },
{ x: 3, y: 150 },
{ x: 4, y: 200 },
{ x: 5, y: 250 },
]
}
]
}); });
chart.render(); chart.render();
} }

@ -27,7 +27,7 @@
<nav class="navbar navbar-expand-lg navbar-dark fixed-top"> <nav class="navbar navbar-expand-lg navbar-dark fixed-top">
<div class="container-fluid mx-0"> <div class="container-fluid mx-0">
<div class="nav-item nav-link"> <div class="nav-item nav-link">
<a class="navbar-brand" href="./Main.html">Home</a> <a class="navbar-brand" href="index.php?action=goToHome">Home</a>
</div> </div>
<div class="mx-auto"> <div class="mx-auto">
<h5 <h5
@ -38,13 +38,13 @@
</h5> </h5>
</div> </div>
<div class="nav-link"> <div class="nav-link">
<a class="navbar-brand" href="./Enigme/palindrome.html">Next</a> <a class="navbar-brand" href="index.php?action=goToEnigme">Next</a>
</div> </div>
</div> </div>
</nav> </nav>
<img src="../../assets/img/BGPres.png" class="img-fluid" /> <img src="./View/assets/img/BGPres.png" class="img-fluid" />
<div class="container pt-5"> <div class="container pt-5">
<div class="col-12"> <div class="col-12">
<div class="row py-5"> <div class="row py-5">
@ -81,7 +81,7 @@
<div class="col-3" id="fox"> <div class="col-3" id="fox">
<img <img
src="../../assets/img/Foxy.png" src="./View/assets/img/Foxy.png"
alt="Logo" alt="Logo"
class="img-fluid rounded-circle moving-fox" class="img-fluid rounded-circle moving-fox"
style="border: 2px solid #44fff6" style="border: 2px solid #44fff6"

Loading…
Cancel
Save