diff --git a/HyperSet/.idea/dataSources.local.xml b/HyperSet/.idea/dataSources.local.xml index 38b01fd..d43c038 100644 --- a/HyperSet/.idea/dataSources.local.xml +++ b/HyperSet/.idea/dataSources.local.xml @@ -1,7 +1,12 @@ - + + + false + + + false diff --git a/HyperSet/.idea/dataSources.xml b/HyperSet/.idea/dataSources.xml index 5f88cba..4d32a6c 100644 --- a/HyperSet/.idea/dataSources.xml +++ b/HyperSet/.idea/dataSources.xml @@ -1,11 +1,17 @@ - + sqlite.xerial true org.sqlite.JDBC - jdbc:sqlite:C:\wamp64\www\HyperSet\bdd\hyperset.db + jdbc:sqlite:C:\wamp64\www\HyperSet\DAL\hyperset.db + + + sqlite.xerial + true + org.sqlite.JDBC + jdbc:sqlite:C:\wamp64\www\HyperSet\hyperset.db \ No newline at end of file diff --git a/HyperSet/.idea/vcs.xml b/HyperSet/.idea/vcs.xml deleted file mode 100644 index 6c0b863..0000000 --- a/HyperSet/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/HyperSet/.idea/workspace.xml b/HyperSet/.idea/workspace.xml index 6a45058..86b7b88 100644 --- a/HyperSet/.idea/workspace.xml +++ b/HyperSet/.idea/workspace.xml @@ -1,13 +1,7 @@ - - - - - - - + - - - - + + + + + + + + + + + + + - - + + - - + + - - + + - + \ No newline at end of file diff --git a/testBD/SQLiteConnection.php b/HyperSet/DAL/SQLiteConnection.php similarity index 100% rename from testBD/SQLiteConnection.php rename to HyperSet/DAL/SQLiteConnection.php diff --git a/testBD/SQLiteTests.php b/HyperSet/DAL/ScoreGateway.php similarity index 97% rename from testBD/SQLiteTests.php rename to HyperSet/DAL/ScoreGateway.php index a3bd433..f0f1f17 100644 --- a/testBD/SQLiteTests.php +++ b/HyperSet/DAL/ScoreGateway.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/HyperSet/site/controllers/Controlleur.php b/HyperSet/controllers/Controlleur.php similarity index 60% rename from HyperSet/site/controllers/Controlleur.php rename to HyperSet/controllers/Controlleur.php index c8f4cd6..0fa729d 100644 --- a/HyperSet/site/controllers/Controlleur.php +++ b/HyperSet/controllers/Controlleur.php @@ -12,15 +12,9 @@ class Controlleur case NULL: $this->homePage(); break; - case "deal": - $this->game(); - break; case "VoirScore": $this->afficherScore(); break; - case "Option": - $this->optionDeJeu(); - break; default: $dVueEreur[] = "Erreur d'appel php"; require ($rep.$vues['error']); @@ -47,34 +41,17 @@ class Controlleur require($rep . $vues['homePage']); } - public function game(){ - global $vues, $rep; - if (isset($_GET['action']) && $_GET['action'] == 'deal') { - - $_SESSION['deck'] = new Deck($_GET['action']); - $_SESSION['game'] = new Game($_SESSION['deck']); - $game = $_SESSION['game']; - echo json_encode($game->start()); - }else if (isset($_GET['action']) && $_GET['action'] == 'submit'){ - $deck = $_SESSION['deck']; - echo json_encode($deck->threeMore()); - } - require ($rep.$vues['jeu']); - - } - public function afficherScore() { global $vues, $rep; - $listPlayer = new ModelPlayer(); try { - - //$listP = $listPlayer->getScores(); + $listPlayer = new ModelScore(); + $listP = $listPlayer->getHScore(); } catch (Exception $e) { diff --git a/HyperSet/bdd/hyperset.db b/HyperSet/hyperset.db similarity index 100% rename from HyperSet/bdd/hyperset.db rename to HyperSet/hyperset.db diff --git a/HyperSet/index.php b/HyperSet/index.php new file mode 100644 index 0000000..3e6eacf --- /dev/null +++ b/HyperSet/index.php @@ -0,0 +1,18 @@ +connect(); + $this->gwScore= new ScoreGateway($pdo); + + } + + public function getHScore(){ + return $this->gwScore->getScore(); + + } + + +} \ No newline at end of file diff --git a/HyperSet/site/set.html b/HyperSet/set.html similarity index 100% rename from HyperSet/site/set.html rename to HyperSet/set.html diff --git a/HyperSet/site/set.php b/HyperSet/set.php similarity index 100% rename from HyperSet/site/set.php rename to HyperSet/set.php diff --git a/HyperSet/site/vues/VoirScore.php b/HyperSet/site/vues/VoirScore.php deleted file mode 100644 index b3d9bbc..0000000 --- a/HyperSet/site/vues/VoirScore.php +++ /dev/null @@ -1 +0,0 @@ -'; + } +} \ No newline at end of file diff --git a/HyperSet/site/vues/css/style-page.css b/HyperSet/vues/css/style-page.css similarity index 100% rename from HyperSet/site/vues/css/style-page.css rename to HyperSet/vues/css/style-page.css diff --git a/HyperSet/vues/css/style.css b/HyperSet/vues/css/style.css new file mode 100644 index 0000000..ff1b538 --- /dev/null +++ b/HyperSet/vues/css/style.css @@ -0,0 +1,162 @@ +* { + box-sizing: border-box; +} + +body { + font-family: Arial, sans-serif; + text-align: center; +} + +h1 { + font-size: 40px; +} + +.submit { + margin-top: 2em; + font-size: 16px; + padding: 1em 3em; + background: #BADA55; + color: #000; +} + +.submit:disabled { + background: #C5DA83; + color: #666; +} + +.wrapper { + width: 1080px; + margin: 0 auto; +} + +.card { + display: inline-block; + width: 245px; + margin-right: 5px; + height: 200px; + border: 2px solid #ccc; +} +.card:hover { + border-color: #e2e2e2; +} + +.selected { + background: #eee; +} + +.game-board { + width: 1000px; + margin: 0 auto; +} + +.shape { + display: inline-block; + width: 70px; + height: 200px; + -webkit-mask-repeat: no-repeat; + -webkit-mask-position: 15px; +} + +.diamond { + clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); + height: 75%; + width: 25%; + margin-top: 10%; +} + + +.wave { + /*clip-path: polygon(5% 34%, 5% 20%, 79% 21%, 66% 61%, 98% 60%, 97% 73%, 19% 74%, 37% 34%);/ + /*-moz-transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg); + -webkit-transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg); + -o-transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg); + -ms-transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg); + transform: scale(0.8) rotate(10deg) translate(15px, -1px) skew(-10deg, 8deg);*/ + + -webkit-border-radius: 20px 100px 20px 100px; + -moz-border-radius: 20px 100px 20px 100px; + border-radius: 20px 100px 20px 100px; + + height: 75%; + width: 25%; + margin-top: 10%; + border: 2px solid white; + +} + + +.oval { + border-radius: 40px / 50px; + height: 75%; + width: 25%; + margin-top: 10%; + border: 2px solid white; + + + +} + + + +.yellow { + background: yellow; +} +.gray { + background: gray; +} +.blue { + background: blue; +} + + + + + +.green.filled { + background: green; +} + +.red.filled { + + background: red; +} +.purple.filled { + background: purple; +} + + + +.red.empty{ + border: 22px solid red; +} + +.green.empty { + border: 22px solid green; +} + +.purple.empty { + border: 22px solid purple; +} + + + + +.red.shaded{ + background: repeating-linear-gradient(-45deg, red, red 5px, white 5px, white 10px); + border: 4px solid red; + +} + +.green.shaded { + background: repeating-linear-gradient(-45deg, green, green 5px, white 5px, white 10px); + border: 4px solid green; + +} + +.purple.shaded { + background: repeating-linear-gradient(-45deg, purple, purple 5px, white 5px, white 10px); + border: 4px solid purple; +} + + +/*solution pour avoir l'image en rainure ou vide a voir dans le css*/ \ No newline at end of file diff --git a/HyperSet/site/index.html b/HyperSet/vues/homePage.html similarity index 84% rename from HyperSet/site/index.html rename to HyperSet/vues/homePage.html index 8155c9a..6e92a99 100644 --- a/HyperSet/site/index.html +++ b/HyperSet/vues/homePage.html @@ -12,7 +12,7 @@