diff --git a/HyperSet/.idea/workspace.xml b/HyperSet/.idea/workspace.xml index f8cf175..087be0c 100644 --- a/HyperSet/.idea/workspace.xml +++ b/HyperSet/.idea/workspace.xml @@ -107,7 +107,9 @@ - + + + @@ -151,10 +153,10 @@ - + - + diff --git a/HyperSet/metiers/deck.php b/HyperSet/metiers/deck.php index f543bd8..ae42223 100644 --- a/HyperSet/metiers/deck.php +++ b/HyperSet/metiers/deck.php @@ -173,7 +173,30 @@ class Deck { } } + }elseif ($changes === 'dealHS0') { + $colors = array('green', 'red', 'purple'); + $shapes = array('oval', 'diamond', 'wave'); + $fill = 'open'; + $border = 'simple'; + $numbers = array(1, 2, 3); + + $index0 = 1; + + foreach ($colors as $color) { + foreach ($shapes as $shape) { + //foreach ($fills as $fill) { + //foreach ($borders as $border) { + foreach ($numbers as $number) { + $cardAttributes = new CardAttributes($color, $shape, $fill, $border, $number, $index0); + $card = new Card($cardAttributes, $this); + $index0++; + } + //} + //} + } + + } } } public function removeSet($cards) { diff --git a/HyperSet/set.php b/HyperSet/set.php index 9e19ce6..071af14 100644 --- a/HyperSet/set.php +++ b/HyperSet/set.php @@ -48,10 +48,16 @@ if (isset($_GET['action']) && $_GET['action'] == 'deal') { $_SESSION['deckHS'] = new Deck($_GET['action']); $_SESSION['gameHS'] = new Game($_SESSION['deckHS']); $game = $_SESSION['gameHS']; - echo json_encode($game->start(20)); + echo json_encode($game->start(40)); +} else if (isset($_GET['action']) && $_GET['action'] == 'dealHS0') { + $_SESSION['deckHS0'] = new Deck($_GET['action']); + $_SESSION['gameHS0'] = new Game($_SESSION['deckHS0']); + $game = $_SESSION['gameHS0']; + echo json_encode($game->start(20)); } + else if (isset($_GET['action']) && $_GET['action'] == 'submit'){ $deck = $_SESSION['deck']; echo json_encode($deck->threeMore()); @@ -74,4 +80,12 @@ else if (isset($_GET['action']) && $_GET['action'] == 'submit4'){ }else if (isset($_GET['action']) && $_GET['action'] == 'submit0'){ $deck = $_SESSION['deck0']; echo json_encode($deck->threeMore()); +} +else if (isset($_GET['action']) && $_GET['action'] == 'submitHS'){ + $deck = $_SESSION['deckHS']; + echo json_encode($deck->fourMore()); +} +else if (isset($_GET['action']) && $_GET['action'] == 'submitHS0'){ + $deck = $_SESSION['deckHS0']; + echo json_encode($deck->fourMore()); } \ No newline at end of file diff --git a/HyperSet/vues/css/style.css b/HyperSet/vues/css/style.css index deb09bb..60081a2 100644 --- a/HyperSet/vues/css/style.css +++ b/HyperSet/vues/css/style.css @@ -78,6 +78,15 @@ h1 { transform: rotate(90deg); } + +.game-boardHS { + margin-top: -5%; + margin-left: 40%; + height: 800px; + width: 800px; + transform: rotate(90deg); +} + .shape { display: inline-block; width: 30px; diff --git a/HyperSet/vues/homePage.html b/HyperSet/vues/homePage.html index fc5cfc0..0fc069d 100644 --- a/HyperSet/vues/homePage.html +++ b/HyperSet/vues/homePage.html @@ -50,13 +50,15 @@ + +