Pierre BALLANDRAS 2 years ago
commit 03946ae9f7

8
.idea/.gitignore vendored

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Scripted.iml" filepath="$PROJECT_DIR$/.idea/Scripted.iml" />
</modules>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpProjectSharedConfiguration" php_language_level="7.4">
<option name="suggestChangeDefaultLanguageLevel" value="false" />
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -1,31 +1,31 @@
CREATE TABLE Admin{ CREATE TABLE Admin(
email varchar(50) PRIMARY KEY, email varchar(50) PRIMARY KEY,
pseudo varchar(50), pseudo varchar(50),
mdp varchar(50) mdp varchar(50)
}; );
CREATE TABLE Enigme{ CREATE TABLE Enigme(
idEnigme char(5) PRIMARY KEY, idEnigme char(5) PRIMARY KEY,
admin varchar(50) REFERENCES Admin(pseudo), admin varchar(50) REFERENCES Admin(email),
enoncé varchar(250) NOT NULL, enoncé varchar(250) NOT NULL,
aide varchar(250), aide varchar(250),
rappel varchar(250), rappel varchar(250),
solution varchar(250) NOT NULL, solution varchar(250) NOT NULL,
test varchar(250) NOT NULL, test varchar(250) NOT NULL,
tempsDeResolution numeric CHECK (tempsDeResolution >0) tempsDeResolution numeric CHECK (tempsDeResolution >0)
}; );
CREATE TABLE Joueur{ CREATE TABLE Joueur(
email varchar(50) PRIMARY KEY, email varchar(50) PRIMARY KEY,
enigmeEnCours varchar(50) REFERENCES Enigme(idEnigme), enigmeEnCours varchar(50) REFERENCES Enigme(idEnigme),
pseudo varchar(50), pseudo varchar(50),
mdp varchar(50) mdp varchar(50)
}; );
CREATE TABLE Game( CREATE TABLE Game(
idGame char(5) NOT NULL, idGame char(5) NOT NULL,
joueur varchar(50) REFERENCES Joueur(pseudo), joueur varchar(50) REFERENCES Joueur(email),
enigme char(5) REFERENCES Enigme(idEnigme), enigme char(5) REFERENCES Enigme(idEnigme),
points numeric CHECK (points >0) points numeric CHECK (points >0),
PRIMARY KEY(idGame, joueur, enigme) PRIMARY KEY(idGame, joueur, enigme)
); );

@ -2,5 +2,66 @@
class Admin class Admin
{ {
private string $email;
private string $pseudo;
private string $mdp;
/**
* @param string $email
* @param string $pseudo
* @param string $mdp
*/
public function __construct(string $email, string $pseudo, string $mdp)
{
$this->email = $email;
$this->pseudo = $pseudo;
$this->mdp = $mdp;
}
/**
* @return string
*/
public function getEmail(): string
{
return $this->email;
}
/**
* @param string $email
*/
public function setEmail(string $email): void
{
$this->email = $email;
}
/**
* @return mixed
*/
public function getPseudo()
{
return $this->pseudo;
}
/**
* @param mixed $pseudo
*/
public function setPseudo($pseudo): void
{
$this->pseudo = $pseudo;
}
/**
* @return mixed
*/
public function getMdp()
{
return $this->mdp;
}
/**
* @param mixed $mdp
*/
public function setMdp($mdp): void
{
$this->mdp = $mdp;
}
} }

@ -2,5 +2,124 @@
class DetailPartie class DetailPartie
{ {
private string $idDetailPartie;
private string $joueur;
private string $partie;
private string $enigme;
private string $pointsObtenus;
private string $classement;
/**
* @param string $idDetailPartie
* @param string $joueur
* @param string $partie
* @param string $enigme
* @param string $pointsObtenus
* @param string $classement
*/
public function __construct(string $idDetailPartie, string $joueur, string $partie, string $enigme, string $pointsObtenus, string $classement)
{
$this->idDetailPartie = $idDetailPartie;
$this->joueur = $joueur;
$this->partie = $partie;
$this->enigme = $enigme;
$this->pointsObtenus = $pointsObtenus;
$this->classement = $classement;
}
/**
* @return string
*/
public function getIdDetailPartie(): string
{
return $this->idDetailPartie;
}
/**
* @param string $idDetailPartie
*/
public function setIdDetailPartie(string $idDetailPartie): void
{
$this->idDetailPartie = $idDetailPartie;
}
/**
* @return string
*/
public function getJoueur(): string
{
return $this->joueur;
}
/**
* @param string $joueur
*/
public function setJoueur(string $joueur): void
{
$this->joueur = $joueur;
}
/**
* @return string
*/
public function getPartie(): string
{
return $this->partie;
}
/**
* @param string $partie
*/
public function setPartie(string $partie): void
{
$this->partie = $partie;
}
/**
* @return string
*/
public function getEnigme(): string
{
return $this->enigme;
}
/**
* @param string $enigme
*/
public function setEnigme(string $enigme): void
{
$this->enigme = $enigme;
}
/**
* @return string
*/
public function getPointsObtenus(): string
{
return $this->pointsObtenus;
}
/**
* @param string $pointsObtenus
*/
public function setPointsObtenus(string $pointsObtenus): void
{
$this->pointsObtenus = $pointsObtenus;
}
/**
* @return string
*/
public function getClassement(): string
{
return $this->classement;
}
/**
* @param string $classement
*/
public function setClassement(string $classement): void
{
$this->classement = $classement;
}
} }

@ -2,5 +2,162 @@
class Enigme class Enigme
{ {
private string $idEnigme;
private string $admin;
private string $enonce;
private string $aide;
private string $rappel;
private string $solution;
private string $test;
private float $tempsDeResolution;
/**
* @param string $idEnigme
* @param string $admin
* @param string $enonce
* @param string $aide
* @param string $rappel
* @param string $solution
* @param string $test
* @param int $tempsDeResolution
*/
public function __construct(string $idEnigme, string $admin, string $enonce, string $aide, string $rappel, string $solution, string $test, float $tempsDeResolution)
{
$this->idEnigme = $idEnigme;
$this->admin = $admin;
$this->enonce = $enonce;
$this->aide = $aide;
$this->rappel = $rappel;
$this->solution = $solution;
$this->test = $test;
$this->tempsDeResolution = $tempsDeResolution;
}
/**
* @return string
*/
public function getIdEnigme(): string
{
return $this->idEnigme;
}
/**
* @param string $idEnigme
*/
public function setIdEnigme(string $idEnigme): void
{
$this->idEnigme = $idEnigme;
}
/**
* @return string
*/
public function getAdmin(): string
{
return $this->admin;
}
/**
* @param string $admin
*/
public function setAdmin(string $admin): void
{
$this->admin = $admin;
}
/**
* @return string
*/
public function getEnonce(): string
{
return $this->enonce;
}
/**
* @param string $enonce
*/
public function setEnonce(string $enonce): void
{
$this->enonce = $enonce;
}
/**
* @return string
*/
public function getAide(): string
{
return $this->aide;
}
/**
* @param string $aide
*/
public function setAide(string $aide): void
{
$this->aide = $aide;
}
/**
* @return string
*/
public function getRappel(): string
{
return $this->rappel;
}
/**
* @param string $rappel
*/
public function setRappel(string $rappel): void
{
$this->rappel = $rappel;
}
/**
* @return string
*/
public function getSolution(): string
{
return $this->solution;
}
/**
* @param string $solution
*/
public function setSolution(string $solution): void
{
$this->solution = $solution;
}
/**
* @return string
*/
public function getTest(): string
{
return $this->test;
}
/**
* @param string $test
*/
public function setTest(string $test): void
{
$this->test = $test;
}
/**
* @return int
*/
public function getTempsDeResolution(): float
{
return $this->tempsDeResolution;
}
/**
* @param int $tempsDeResolution
*/
public function setTempsDeResolution(float $tempsDeResolution): void
{
$this->tempsDeResolution = $tempsDeResolution;
}
} }

@ -2,5 +2,29 @@
class Partie class Partie
{ {
private string $idPartie;
/**
* @param string $idPartie
*/
public function __construct(string $idPartie)
{
$this->idPartie = $idPartie;
}
/**
* @return string
*/
public function getIdPartie(): string
{
return $this->idPartie;
}
/**
* @param string $idPartie
*/
public function setIdPartie(string $idPartie): void
{
$this->idPartie = $idPartie;
}
} }

@ -13,7 +13,7 @@ DROP TABLE Joueur;
CREATE TABLE Joueur( CREATE TABLE Joueur(
email varchar(50) PRIMARY KEY, email varchar(50) PRIMARY KEY,
seudo varchar(50), pseudo varchar(50),
mdp varchar(50) mdp varchar(50)
); );

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/php.iml" filepath="$PROJECT_DIR$/.idea/php.iml" />
</modules>
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PhpProjectSharedConfiguration" php_language_level="7">
<option name="suggestChangeDefaultLanguageLevel" value="false" />
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
Loading…
Cancel
Save