algolfier 4 years ago
commit 238e140ee7

@ -0,0 +1,32 @@
<?php
include "save.php";
$name = $_POST['name'];
$email = $_POST['email'];
$lang = $_POST['lang'];
$foundjquery = "Not found";
if(in_array('jQuery',$lang)){
$foundjquery = "found";
}
// Converting the array to comma separated string
$lang = implode(",",$lang);
// check entry
$sql = "SELECT COUNT(*) AS cntuser from userinfo WHERE email='".$email."'";
$result = mysqli_query($con,$sql);
$row = mysqli_fetch_array($result);
$count = $row['cntuser'];
if($count > 0){
// update
$updatequery = "UPDATE userinfo SET name='".$name."',lang='".$lang."' WHERE email='".$email."'";
mysqli_query($con,$updatequery);
}else{
// insert
$insertquery = "INSERT INTO userinfo(name,email,lang) VALUES('".$name."','".$email."','".$lang."')";
mysqli_query($con,$insertquery);
}
$return_arr = array('name'=>$name,'email'=>$email,'lang'=>$lang,"foundjquery"=>$foundjquery);
echo json_encode($return_arr);

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script>
$(document).on('click','#save',function(e) {
var vehicle = ['a','b','d'];
$.ajax({
data: {
vehicle:vehicle
},
type: "post",
url: "save.php",
success: function(data){
alert(data)
}
});
});
</script>
</head>
<body>
<form action="" id="form-search">
<input type="checkbox" name="vehicle" value="Bike"> I have a bike<br>
<input type="checkbox" name="vehicle" value="Car"> I have a car<br>
<input type="checkbox" name="vehicle" value="Boat"> I have a boat<br>
</form>
<button id="save" name="save">Serialize form values</button>
</body>
</html>
<?php
session_start();
if(isset($_SESSION['idpartie'])){
$vehicle=$_SESSION['idpartie'];
print_r($vehicle);
}
?>

File diff suppressed because one or more lines are too long

@ -0,0 +1,6 @@
<?php
session_start();
$vehicle=$_POST['vehicle'];
$_SESSION['idpartie']=$vehicle;
print_r($vehicle);
?>

@ -0,0 +1,41 @@
$(document).ready(function(){
// submit button click
$("#submit").click(function(){
var name = $("#txt_name").val();
var email = $("#txt_email").val();
var lang = [];
// Initializing array with Checkbox checked values
$("input[name='prolang']:checked").each(function(){
lang.push(this.value);
});
if(email != ''){
$.ajax({
url: 'getData.php',
type: 'post',
data: {name:name,email:email,lang:lang},
dataType: 'JSON',
success: function(response){
$('.details').show();
// selecting values from response Object
var name = response.name;
var email = response.email;
var lang = response.lang;
var foundjquery = response.foundjquery;
// setting values
$('#name').text(name);
$('#email').text(email);
$('#lang').text(lang);
$('#foundjquery').text(foundjquery);
}
});
}
});
});

@ -0,0 +1,47 @@
.container{
width: 400px;
margin: 0 auto;
width: 400px;
}
.content{
padding: 5px;
border: 2px solid gray;
border-radius: 3px;
margin-bottom:10px;
}
.element{
margin-bottom: 10px;
}
h1{
background: lightgreen;
color: white;
font-family: sans-serif;
font-weight: normal;
padding: 5px 10px;
margin-top: 0;
}
/* Textbox */
input[type='text'],input[type='email']{
padding: 5px 10px;
width: 94%;
font-size: 15px;
letter-spacing: 1px;
}
/* Button */
input[type='button']{
background: orange;
color: white;
padding: 5px 10px;
font-size: 16px;
font-weight: bold;
border: 0;
}
.details{
display: none;
}

@ -0,0 +1,7 @@
CREATE TABLE `userinfo` (
`id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
`lang` varchar(100) NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

@ -0,0 +1,6 @@
<?php
session_start();
$idparte = $_SESSION['idpartie'];
echo "<h2 id='ids'>Identifiant partie : <strong>$idparte</strong> <button onclick='myFunction()' type='button' class='btn btn-dark'>Copier Id</button></h2>";
echo "<input type='text' class='myInput' value='$idparte' id='myInput'>";

@ -0,0 +1,21 @@
<?php
class MyDB extends SQLite3
{
function __construct()
{
$this->open('mysqlitedb.db');
}
}
function genererChaineAleatoire($longueur = 10)
{
$caracteres = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$longueurMax = strlen($caracteres);
$chaineAleatoire = '';
for ($i = 0; $i < $longueur; $i++)
{
$chaineAleatoire .= $caracteres[rand(0, $longueurMax - 1)];
}
return $chaineAleatoire;
}

@ -0,0 +1,13 @@
<?php
session_start();
require_once("ConnexionBDD.php");
$db = new MyDB();
$id=$_SESSION['idpartie'];
$requete ="DELETE FROM partie where Id='".$id."'";
$suppression = $db->query($requete);
$newid=genererChaineAleatoire(10);
$_SESSION['idpartie']=$newid;
$db->query('INSERT INTO partie(Id) VALUES("'.$newid.'")');
header("refresh: 1");

@ -0,0 +1,480 @@
#pageAccueil {
visibility: visible;
}
#cloud {
z-index: 10
}
#mount1 {
z-index: 11;
position: absolute;
}
#mount2 {
z-index: 10;
}
.containerparam{
position: absolute;
display: flex;
margin-left: 1vw;
}
.containerparam > div {
margin-right: 4vh;
}
/*SETTINGS*/
#forme{
visibility: hidden;
}
#couleurs{
z-index: 1;
}
.pannel{
height: 100px;
width: 100px;
background-color: red;
}
#pickrcontner{
position: relative;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
.Mode_Setting{
height: 20vw;
position: relative;
margin : 0 auto;
}
#BottomSetings{
position: absolute;
left: 0;
bottom: 0;
height: 5vw;
width: 100%;
border-radius: 0 0 0.3vw 0.3vw;
}
#SettingBefore{
height: 5vw;
width: 5vw;
background-color: var(--lightsedonca);
color: black;
font-size: 3vw;
visibility: collapse;
}
#SettingAfter{
bottom: 5vw;
position: relative;
height: 5vw;
width: 5vw;
background-color: var(--lightsedonca);
float: right;
}
#testSettings{
position: absolute;
color: black;
bottom: 0;
left: 18vw;
}
#ShapeSettings{
height: 100%;
width: 100%;
margin: auto 2vw;
display: flex;
flex-wrap: wrap;
}
.ShapeContener{
height: 9vw;
width: 9vw;
margin-left: 1vw;
position: relative;
display: table-cell;
vertical-align: middle;
}
.settingShape{
background-color: #333;
}
.Colorone{background-color: var(--colorbase);}
.Colortwo{background-color: var(--colorcarre);}
.Colorthree{background-color: var(--colorone);}
.Colorfour{background-color: var(--colortwo);}
.Colorfive{background-color: var(--colorthree);}
/*Bouton info*/
#infosec{
z-index:15;
width: 2vw;
}
#infosec2{
z-index:15;
width: 2vw;
}
#info {
color: var(--lightprima);
text-decoration: none;
font-size: 45px;
}
#info:hover {
color: var(--lightprima);
}
.activity {
padding: 0;
list-style: none;
}
li {
-webkit-transition: box-shadow 0.2s ease;
-moz-transition: box-shadow 0.2s ease;
transition: box-shadow 0.2s ease;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
border-radius: 50%;
color: #B7B7B7;
display: inline-block;
font-size: 0.889em;
height: 3em;
position: relative;
text-align: center;
text-transform: lowercase;
width: 3em;
line-height: 3em;
}
li a {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
li:hover {
box-shadow: 0 0 0 7px var(--lightsedonca);
font-size:99%;
position:relative;
right:5%;
}
li:before {
border-radius: 50%;
bottom: 0;
box-shadow: 0 0 0 4px var(--lightsedonca);
content: '';
left: 0;
position: absolute;
right: 0;
top: 0;
background-color: var(--lightsedonca);
}
/*Les règles popups*/
.overlay {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: rgba(0, 0, 0, 0.7);
transition: opacity 500ms;
visibility: hidden;
opacity: 0;
z-index: 21;
}
.overlay:target {
visibility: visible;
opacity: 1;
}
.popup {
margin: 70px auto;
padding: 20px;
background: #fff;
border-radius: 5px;
width: 30%;
position: relative;
top:25%;
}
.popup h2 {
margin-top: 0;
color: #333;
font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
position: absolute;
top: 20px;
right: 30px;
transition: all 200ms;
font-size: 30px;
font-weight: bold;
text-decoration: none;
color: #333;
}
.popup .close:hover {
color: #06D85F;
}
.popup .content {
max-height: 30%;
overflow: auto;
}
/*Parametres*/
.popup2 {
margin: 70px auto;
padding: 20px;
background: #fff;
border-radius: 5px;
width: 45%;
height: 65%;
position: relative;
top:10%;
}
.popup2 h2 {
margin-top: 0;
color: #333;
font-family: Tahoma, Arial, sans-serif;
}
h3 {
margin: 0;
color: #333;
font-family: Tahoma, Arial, sans-serif;
}
.popup2 .close {
position: absolute;
top: 20px;
right: 30px;
transition: all 200ms;
font-size: 30px;
font-weight: bold;
text-decoration: none;
color: #333;
}
.popup2 .close:hover {
color: #06D85F;
}
.popup2 .content {
max-height: 30%;
}
.titre{
display: ruby-base;
}
label {
cursor: pointer;
text-indent: -9999px;
width: 2vw;
height: 1vw;
background: grey;
display: block;
border-radius: 100px;
position: relative;
}
label:after {
content: '';
position: absolute;
top: 0.1vw;
left: 0.1vw;
width: 0.8vw;
height: 0.8vw;
background: #fff;
border-radius: 90px;
transition: 0.3s;
}
input:checked + label {
background: #bada55;
}
input:checked + label:after {
left: calc(100% - 0.1vw);
transform: translateX(-100%);
}
label:active:after {
width: 1.4vw;
}
/* J'ai trop avancé, mode multi*/
#containpseudo {
position: absolute;
height: 15%;
width: 30%;
z-index: 12;
left: 35%;
top: 30%;
}
.bouttonvalider:hover {
box-shadow: 0 0 0 8px var(--lightsedonca);
font-size: 100%;
position: relative;
transition: box-shadow 0.2s ease;
}
#bouttonvalider:hover {
box-shadow: 0 0 0 5px var(--lightsedonca);
position: relative;
}
#pseudoenter {
background-color: red;
height: 100%;
border-radius: 45px;
background-color: #B130DE;
}
#inputpseudo {
position: absolute;
width: 99%;
height: 65%;
border-radius: 30px;
font-size: 3vw;
background-color: transparent;
-moz-appearance: none;
text-align: center;
color: #707070;
border-color: transparent;
font-family: impact, Arial Black;
z-index: 11;
}
#fondinput {
background-color: red;
position: absolute;
width: 97%;
background-color: var(--lightsedonca);
height: 90%;
border-radius: 40px;
left: 1.5%;
top: 5%;
z-index: 10;
}
#modeprec{
height: 100%;
width: 15%;
float: left;
position: relative;
}
#modesuiv{
height: 100%;
width: 15%;
float: right;
position: relative;
}
#textdumode{
height: 100%;
width: 70%;
position: absolute;
left: 15%;
}
#buttonadd {
position: absolute;
top: 30%;
right: -12%;
height: 3vw;
width: 3vw;
border-radius: 2vw;
background-color: #B130DE;
z-index: 18;
}
#textplus {
font-size: 3vw;
font-family: arial, Arial Black;
position: absolute;
margin-top: -0.15vw;
margin-left: 0.65vw;
color: var(--lightprima);
}
#containplayers {
position: absolute;
background-color: transparent;
color: var(--lightsedonca);
width: 15vw;
height: 20vw;
z-index: 17;
right: 0%;
top: 8vw;
}
.pseudojoueur {
float: right;
margin-top: 0px;
margin-bottom: 3%;
margin-right: 10%;
font-family: Lucida Console, Arial Black, Arial;
font-size: 2vw;
}
#pseudolist {
width: 100%;
height: 1.7vw;
}
/* === FORMES === */
.contentButton{
height: 3vw;
width: 15%;
margin : 0 auto;
position: relative;
bottom: 5vw;
}
.buttonvalidersettings{
height: 100%;
width: 100%;
border-style: none;
background-color: red;
color: white;
font-family: arial;
font-size: 2vw;
border-radius: 15px;
}
.buttonvalidersettings:active{
background-color: blue;
}

@ -0,0 +1,109 @@
#pageGame {
visibility: hidden;
}
.menuhaut {
height: 10vh;
width: inherit;
display: flex;
}
/*Partie Menu du haut*/
.menu{
align-items: center;
justify-content: center;
}
.retourstp {
position: absolute;
}
#Redistribution{
position:relative;
top:-3vw;
}
#affSolution {
text-align: center;
font-family: Montserrat, impact, Arial Black;
font-size: 2.5vw;
color: var(--lightsedonca);
width: inherit;
}
#textjouer2 {
position: absolute;
text-align: center;
font-family: Montserrat, impact, Arial Black;
margin-top: 0.6vw;
color: var(--lightsedonca);
width: inherit;
}
#btnvalider2 {
position: relative;
text-align: center;
font-family: Montserrat, impact, Arial Black;
font-size: 2.5vw;
margin-top: 0.2vw;
margin-left: 0.2vw;
color: var(--lightsedonca);
}
#btnvalider3 {
position: relative;
text-align: center;
font-family: Montserrat, impact, Arial Black;
font-size: 2.5vw;
margin-top: 0.2vw;
margin-left: 0.2vw;
color: var(--lightsedonca);
}
#Redistribution2 {
position: relative;
top:-3vw;
left:68%;
}
#Redistribution3 {
position: relative;
top:-3vw;
left: 50%;
}
.bouttonvalider2:hover {
box-shadow: 0 0 0 8px var(--lightsedonca);
font-size: 100%;
position: relative;
transition: box-shadow 0.2s ease;
}
#progressbar
{
position : relative;
width: 1100px;
padding:1px;
background-color:white;
border:1px solid black;
height:10px;
border-radius: 5px;
margin-top: 40px;
margin-right: auto;
margin-left: auto;
}
#indicateur
{
width: 800px;
background-color : green;
height:10px;
margin: 0;
}

@ -0,0 +1,84 @@
/*Ecran*/
@media screen and (min-width: 960px) {
/*ROND*/
.anneau {
position: relative;
background-color: var(--colorbase);
border-radius: var(--v);
height: var(--v);
width: var(--v);
display: table-cell;
vertical-align: middle;
}
.anneau2 {
position: relative;
background-color: white;
border-radius: var(--v);
height: var(--v);
width: var(--v);
left : calc((var(--u) - var(--v))/2);
display: table-cell;
vertical-align: middle;
}
.anneau3 {
position: relative;
background-color: var(--colorbase);
border-radius: var(--v);
height: var(--v);
width: var(--v);
margin-left: auto;
margin-right: auto;
}
.rondinterieur {
background-color: var(--lighttercia);
height: var(--w);
width: var(--w);
display: table;
margin: 0 auto;
border-radius: var(--w);
}
.rond {
display: table;
margin: 0 auto;
background-color: var(--colorbase);
height: var(--w);
width: var(--w);
border-radius: var(--w);
}
.rondcache {
display: table;
margin: 0 auto;
background-color: black;
border-radius: var(--y);
}
.rond2 {
display: table;
margin: 0 auto;
background-color: white;
height: var(--w);
width: var(--w);
border-radius: var(--w);
}
.rond3 {
position: relative;
top : calc((var(--v) - var(--w))/ 2);
left : calc((var(--v) - var(--w))/2);
display: table-cell;
vertical-align: middle;
background-color: white;
height: var(--w);
width: var(--w);
border-radius: var(--w);
}
.rond4 {
display: table;
margin: 0 auto;
background-color: var(--colorbase);
height: var(--w);
width: var(--w);
border-radius: var(--w);
}
}

@ -0,0 +1,114 @@
:root{
/*couleur héhé*/
--lightprima: #DEDEDE;
--lightsedonca: #B7B7B7;
--lighttercia: #E6E6E6;
/*Couleur bases*/
--colorbase : #e75259;
--colorcarre : #30C0DE;
--colorone : #00CBFF;
--colortwo : #00FF6E;
--colorthree : #C800FF;
--colorfour : #E6DA27;
--colorfive : #2E6DB4;
--colorsix : #E6792F;
/*Les formes*/
--u: calc(var(--x) / 2.75);
--v: calc(var(--y) / 2.75);
--w: calc(var(--z) / 2.75);
/*Les formes settings*/
--x : 10vw;
--y : 7vw;
--z : 3.75vw;
}
.test{
color: black;
}
a {
cursor: pointer;
z-index: 60;
}
body {
background-color: var(--lightprima);
height: 100%;
overflow-x: hidden;
overflow-y: hidden;
/*Desactiver la selection*/
-webkit-user-select: none; /* Chrome / Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE 10+ */
user-select: none;
}
#ContainBottom {
position: absolute;
margin-left: 25vw;
height: 12vw;
width: auto;
bottom: 0;
z-index: 20;
}
#clic{
position: absolute;
left: 55vw;
top : 7vw;
height: auto;
width: 15vw;
}
#card-conteneur{
z-index: 20;
position: absolute;
left: 0vw;
}
.flex-container {
padding: 0;
margin: 0;
list-style: none;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-flex-flow: row wrap;
justify-content: space-around;
margin-top: -7vw;
}

@ -0,0 +1,293 @@
/*Ecran*/
@media screen and (min-width: 992px) {
:root{
--taille : 10vw;
}
/*PARTIE FORMES*/
.containform3 {
position: relative;
height: var(--x);
width: var(--x);
display: table-cell;
vertical-align: middle;
}
.containinte{
/*PROBLEME SIZE*/
top: calc((var(--y) - var(--z)) / 2);
left: calc((var(--y) - var(--z)) / 2);
height: var(--z);
width: var(--z);
z-index: 2;
position: absolute;
}
.cache{
top: calc((var(--x) - var(--y)) / 2.8);
left: calc((var(--x) - var(--y)) / 2.2);
height: calc(var(--y)*1.05);
width: calc(var(--y)*1.05);
z-index: 2;
position: absolute;
z-index: 15;
}
#choosemode {
height: 4vw;
width: 16vw;
position: absolute;
left: 42vw;
top: 50vh;
z-index: 15;
}
#conteneurmode{
width: 80%;
height: 2vw;
left : 10%;
top : 25%;
position: absolute;
margin: 0 auto;
background-color: var(--lightsedonca);
border-radius: 5vw;
}
#triangleprec{
width: 0;
height: 0;
margin: 0.25vw auto 0 auto;
border-top: 0.75vw solid transparent;
border-right: 1.25vw solid grey;
border-bottom: 0.75vw solid transparent;
}
#trianglesuiv{
width: 0;
height: 0;
margin: 0.25vw auto 0 auto;
border-top: 0.75vw solid transparent;
border-left: 1.25vw solid grey;
border-bottom: 0.75vw solid transparent;
}
#textmode {
font-family: Lucida Console, Arial Black, Arial;
font-size: 1vw;
color: #707070;
text-align:center;
margin: 5% auto 0 auto;
}
#formSize{
margin : 0 auto;
width: 100%;
height: 3vw;
}
.slider-container .bar .fill {
display: block;
width: 50%;
height: 100%;
background-color: #6200ee;
}
.slider-container .slider {
position: relative;
z-index: 2;
-webkit-appearance: none;
width: 100%;
height: 10px;
border-radius: 5px;
outline: none;
background-color: transparent;
}
.slider.container{
position: relative;
}
.slider-container .bar {
position: absolute;
z-index: 1;
left: 0;
width: 100%;
height: 10px;
border-radius: 5px;
background-color: #c6aee7;
overflow: hidden;
}
/*Moz*/
.slider-container .slider::-moz-range-thumb {
-webkit-appearance: none;
width: 1vw;
height: 1vw;
background-color: #6200ee;
border-radius: 1vw;
cursor: pointer;
outline: none;
box-shadow: 0 0 0 0 rgba(98, 0 ,238, .1);
transition: .3s ease-in-out;
}
.slider-container .slider::-moz-range-thumb:hover {
box-shadow: 0 0 0 10px rgba(98,0,238,.1);
}
.slider-container .slider:active::-moz-range-thumb {
box-shadow: 0 0 0 20px rgba(98,0,238,.2);
}
/*===========================================*/
.logoboutton{
font-size: 2vw;
color: var(--lightprima);
margin: 0.25vw;
}
/*Externe*/
.bouttonMenuHaut{
height: 4vw;
width: 4vw;
background-color: var(--lightsedonca);
border-radius: 50%;
margin: 0 auto;
margin-top: 0.45vw;
position: relative;
display: block;
}
#affPoints {
text-align: center;
font-family: Montserrat, impact, Arial Black;
font-size: 2vw;
margin-top: 1.2vw;
color: var(--lightsedonca);
}
.divmenu {
width: 10vw;
height: inherit;
margin-right: 1vw;
}
.containButtonForm{
height: 2.5vw;
width: 2.5vw;
margin: 0.75vw;
position: absolute;
}
.buttonretour {
position: relative;
height: 4vh;
width: 4vh;
border-radius: 55vw;
background-color: var(--lightsedonca);
z-index: 5;
margin-left: 2vw;
top: 1.75vw;
}
.flex-item {
background: var(--lightsedonca);
width: var(--taille);
border-radius: 0.75vw;
padding-right: 0.15vw;
padding-left: 0.15vw;
padding-bottom: 0.25vw;
list-style: none;
display: flex;
margin-right: 0.4vw;
margin-left: 0.4vw;
margin-bottom: 1vw;
-webkit-flex-flow: row wrap;
justify-content: space-around;
}
.item-form {
width: 3vw;
padding-left: 0.1vw;
margin-top: 0.25vw;
height: 3vw;
border-radius: 10px;
background-color: var(--lighttercia);
}
.containcards {
overflow-x: auto;
display: flex;
flex-wrap: wrap;
padding-top: 1vw;
justify-content: center;
}
.logop2 img {
width: 20vh;
padding-top: 1vh;
position: relative;
}
.txt {
position: absolute;
font-family: Arial Black;
color: var(--lightprima);
font-size: 1.5vw;
left: 0.4vw;
top: -1.6vh;
}
.logo img {
position: absolute;
width: 12vw;
left: 44vw;
top: 13%;
z-index: 11;
}
.mounts img {
position: absolute;
height: 100%;
width: 100%;
pointer-events: none;
margin-left: -10px;
}
#contourbuttonvalider {
position: absolute;
border-radius: 45px;
left: 9.2vw;
top: 3.5vw;
height: 4vw;
width: 12vw;
background-color: var(--lightsedonca);
z-index: 15;
}
.bouttonvalider {
position: absolute;
height: 3.4vw;
width: 11.4vw;
top: 0.3vw;
left: 0.3vw;
border-radius: 30px;
}
.violet{
background-color: #B130DE;
}
.vert {
background-color: #00CC66;
}
#textjouer {
font-family: Montserrat, impact, Arial Black;
position: absolute;
font-size: 2.5vw;
margin-top: 0.2vw;
color: var(--lightsedonca);
text-align:center;
width: inherit;
}
}

@ -0,0 +1,111 @@
.containform {
position: relative;
}
.ajustementPetiteForme{
margin-top: 25%;
}
.ajustementGrandeForme{
margin-top: 0.2vw;
margin-left: 0.2vw;
}
.containform2{
position: relative;
height: var(--x);
width: var(--x);
display: table-cell;
vertical-align: middle;
background-color: black;
}
/*ROND*/
.containexte{
height: var(--y);
width: var(--y);
margin: 0 auto;
position: relative;
top: calc(var(--x)/8);
}
#cacherond{
display: none;
}
.rond{
-webkit-clip-path: circle(50% at 50% 50%);
clip-path: circle(50% at 50% 50%);
}
.round{
border-radius: 5vw;
}
.cb{
background-color: white;
}
.cn{
background-color: black;
}
.formeinte{
height: 90%;
width: 90%;
margin: 0 auto;
}
.formeexte{
height: 100%;
width: 100%;
}
.carre{
-webkit-clip-path: inset(0 0 0 0);
clip-path: inset(0 0 0 0);
}
.triangle{
-webkit-clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.castriangle{
margin-top: calc( (var(--y) - var(--z)) / 5);
}
.caspenta{
margin-top: calc( (var(--y) - var(--z)) / 10);
}
.losange{
-webkit-clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}
.croix{
-webkit-clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);
clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);
}
.croixinte{
-webkit-clip-path: polygon(26% 23%, 22% 27%, 45% 50%, 22% 74%, 27% 78%, 50% 55%, 74% 78%, 78% 73%, 55% 50%, 78% 27%, 73% 23%, 50% 46%);
clip-path: polygon(26% 23%, 22% 27%, 45% 50%, 22% 74%, 27% 78%, 50% 55%, 74% 78%, 78% 73%, 55% 50%, 78% 27%, 73% 23%, 50% 46%);
}
.penta{
-webkit-clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
}
.hexa{
-webkit-clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.hocto{
-webkit-clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}

@ -0,0 +1,6 @@
/*Demi Ecran*/
@media screen and (max-width: 768px) {
body{
background-color: green;
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,289 @@
/*DemTéléphone 1i Ecran*/
@media screen and (min-width: 669px) and (max-width: 992px) {
:root{
--taille : 14vw;
}
.containform3 {
position: relative;
height: calc(1.25*var(--x));
width: calc(2*var(--x));
display: table-cell;
vertical-align: middle;
left: -2vw;
}
.containinte{
/*PROBLEME SIZE*/
top: calc(1.5*((var(--y) - var(--z)) / 2));
left: calc(1.5*((var(--y) - var(--z)) / 2));
height: calc(1.5*var(--z));
width: calc(1.5*var(--z));
z-index: 2;
position: absolute;
}
.cache{
top: calc(0.91*((var(--x) - var(--y)) / 2.8));
left: calc(4.55*((var(--x) - var(--y)) / 2.2));
height: calc(1.5*var(--y)*1.05);
width: calc(1.5*var(--y)*1.05);
z-index: 2;
position: absolute;
z-index: 15;
}
#formSize{
margin : 0 auto;
width: 100%;
height: 3vw;
position: relative;
top: 3vw;
}
.slider-container .bar .fill {
display: block;
width: 50%;
height: 100%;
background-color: #6200ee;
}
.slider-container .slider {
position: relative;
z-index: 2;
-webkit-appearance: none;
width: 100%;
height: 10px;
border-radius: 5px;
outline: none;
top: -0.25vw;
background-color: transparent;
}
.slider.container{
position: relative;
}
.slider-container .bar {
position: absolute;
z-index: 1;
left: 0;
width: 100%;
height: 10px;
border-radius: 5px;
background-color: #c6aee7;
overflow: hidden;
}
/*Moz*/
.slider-container .slider::-moz-range-thumb {
-webkit-appearance: none;
width: 2vw;
height: 2vw;
background-color: #6200ee;
border-radius: 1vw;
cursor: pointer;
outline: none;
box-shadow: 0 0 0 0 rgba(98, 0 ,238, .1);
transition: .3s ease-in-out;
}
.slider-container .slider::-moz-range-thumb:hover {
box-shadow: 0 0 0 10px rgba(98,0,238,.1);
}
.slider-container .slider:active::-moz-range-thumb {
box-shadow: 0 0 0 20px rgba(98,0,238,.2);
}
.logop2 img {
width: 20vh;
padding-top: 1vh;
position: relative;
}
.txt {
position: absolute;
font-family: Arial Black;
color: var(--lightprima);
font-size: 5.5vw;
left: 2.25vw;
top: -1vh;
}
.logo img {
position: absolute;
width: 45vw;
left: 28vw;
top: 13%;
z-index: 11;
}
.mounts img {
position: absolute;
height: 100%;
width: 100%;
pointer-events: none;
margin-left: -1vw;
margin-top: -1vw;
object-fit: cover;
}
#contourbuttonvalider {
position: absolute;
border-radius: 45px;
left: -10vw;
top: 5.5vw;
height: 15vw;
width: 50vw;
background-color: var(--lightsedonca);
z-index: 15;
}
.bouttonvalider {
position: absolute;
height: 13vw;
width: 47vw;
top: 1.1vw;
left: 1.5vw;
border-radius: 30px;
background-color: #B130DE;
}
.bouttonvalider2 {
position: absolute;
height: 6.8vw;
width: 22.8vw;
top: 1.1vw;
left: 1.1vw;
border-radius: 30px;
background-color: #00CC66;
}
#textjouer {
font-family: Montserrat, impact, Arial Black;
position: absolute;
font-size: 10vw;
margin-top: 0.2vw;
width: inherit;
text-align: center;
color: var(--lightsedonca);
}
#choosemode {
height: 7vw;
width: 50vw;
position: absolute;
left: 25vw;
top: 50vh;
z-index: 15;
}
#conteneurmode{
width: 80%;
height: 80%;
left : 10%;
top : 45%;
position: absolute;
background-color: var(--lightsedonca);
border-radius: 5vw;
}
#triangleprec{
width: 0;
height: 0;
margin: 0.25vw auto 0 auto;
border-top: 2vw solid transparent;
border-right: 4vw solid grey;
border-bottom: 2vw solid transparent;
margin-top: 0.75vw;
}
#trianglesuiv{
width: 0;
height: 0;
margin: 0.25vw auto 0 auto;
border-top: 2vw solid transparent;
border-left: 4vw solid grey;
border-bottom: 2vw solid transparent;
margin-top: 0.75vw;
}
#textmode {
font-family: Lucida Console, Arial Black, Arial;
font-size: 3vw;
color: #707070;
text-align:center;
margin: 5% auto 0 auto;
}
.logoboutton{
font-size: 2vw;
color: var(--lightprima);
margin: 1vw;
}
/*Externe*/
.bouttonMenuHaut{
height: 4vw;
width: 4vw;
background-color: var(--lightsedonca);
border-radius: 50%;
margin: 0 auto;
margin-top: 2.5vw;
position: relative;
display: block;
}
.divmenu {
width: 25vw;
height: inherit;
margin-right: 1vw;
}
#affPoints {
text-align: center;
font-family: Montserrat, impact, Arial Black;
font-size: 2vw;
margin-top: 3.5vw;
color: var(--lightsedonca);
}
.containcards {
overflow-x: auto;
display: flex;
flex-wrap: wrap;
padding-top: 5vw;
justify-content: center;
width: 70vw;
margin: 0 auto;
grid-row-gap: 2vw;
column-gap: 2vw;
}
.flex-item {
flex-grow: 1;
background: var(--lightsedonca);
width: var(--taille);
border-radius: 0.75vw;
padding-right: 0.15vw;
padding-left: 0.15vw;
padding-bottom: 0.25vw;
list-style: none;
display: flex;
margin-right: 0.4vw;
margin-left: 0.4vw;
margin-bottom: 1vw;
-webkit-flex-flow: row wrap;
justify-content: space-around;
}
.item-form {
width: 4vw;
height: 4vw;
padding-left: 0.1vw;
margin-top: 0.25vw;
border-radius: 10px;
background-color: var(--lighttercia);
}
}

@ -0,0 +1,2 @@
[1111/102926.535:ERROR:directory_reader_win.cc(43)] FindFirstFile: Le chemin daccès spécifié est introuvable. (0x3)
[1120/122821.005:ERROR:directory_reader_win.cc(43)] FindFirstFile: Le chemin daccès spécifié est introuvable. (0x3)

@ -0,0 +1,5 @@
<?php
session_start();
$cartes=$_POST['cartestables'];
$_SESSION['cartestables']=$cartes;
print_r($cartes);

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@ -0,0 +1,725 @@
<!DOCTYPE html>
<html>
<head lang="fr">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>SwishGame</title>
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/phone.css">
<link rel="stylesheet" href="css/tablet.css">
<link rel="stylesheet" href="css/desktops.css">
<link rel="stylesheet" href="css/PageDaccueil.css">
<link rel="stylesheet" href="css/PartieGame.css">
<link rel="stylesheet" href="css/pickr.min.css">
<link rel="stylesheet" href="css/formes.css">
<link rel="stylesheet" href="css/Resp3.css">
<script type="text/javascript" src="js/main.js"></script>
<script type="text/javascript" src="js/menu.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script src="js/jquery-3.1.1.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.1/css/all.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
</head>
<body onload="settingOpen()">
<button id="buttons" type="button" class="btn btn-primary btn-lg">Réinitialiser / Creer partie</button>
<form method="post">
<input name="rejoindre">
<button type="submit" class="btn btn-secondary btn-lg">Rejoindre partie</button>
</form>
<?php
require_once("ConnexionBDD.php");
session_start();
if(isset($_POST['rejoindre'])){
$_SESSION['idpartie']=$_POST['rejoindre'];
}
if(!isset($idpartie)){
$idpartie = $_SESSION['idpartie'];
}
echo "<h2 id='ids'>Identifiant partie : <strong>$idpartie</strong></h2>";
?>
<div id="div1"></div>
<script>
$(document).ready(function(){
$("#buttons").click(function(){
$("#div1").load('SupprimerEtCreerPartie.php')
});
});
</script>
<script>
$(document).ready(function(){
setInterval(function(){
$("#ids").load('ActualiserIDPartie.php')
}, 500);
});
</script>
<?php
if(isset($_SESSION['cartestables'])){
$cartestable = $_SESSION['cartestables'];
print_r($cartestable);
}
?>
<button id="save" name="save">Envoyer les cartes</button>
<div id="pageAccueil">
<div class="logo">
<a onclick="journuit()">
<img src="imgs/swishjour.png" id="imglogo">
</a>
</div>
<div class="containerparam">
<div id="infosec">
<div class="inner">
<ul class="activity">
<li id="listeinfobtn">
<a id="info" href="#popup1">i</a>
</li>
</ul>
</div>
</div>
<div id="infosec2">
<div class="inner">
<ul class="activity">
<li id="listeinfobtn">
<a id="info" onclick="settingOpen()" href="#popup2">&#9881;</a>
</li>
</ul>
</div>
</div>
</div>
<div id="containpseudo">
<a onclick="lancerpartie()">
<div id="contourbuttonvalider">
<div class="bouttonvalider">
<h1 id="textjouer">JOUER</h1>
</div>
</div>
</a>
</div>
<div id="popup1" class="overlay">
<div class="popup">
<h2>Les Règles :</h2>
<a class="close" href="#">&times;</a>
<div class="content">
Swish : Jeu de 60 cartes compos&eacute chacun de billes et de cerceaux, de 4 couleurs
diff&eacuterentes possibles. 16 cartes sont pos&eacutes sur une table et le joueur doit faire superposer
des cartes de mani&egravere que chaque bille soit dans le cerceau de m&ecircme couleur dune autre
carte.
</div>
</div>
</div>
<div id="popup2" class="overlay">
<div class="popup2">
<h2 id="SettingName">Param&#232;tres</h2>
<a class="close" onclick="SettingClose()" href="#">&times;</a>
<div class="content">
<div id="couleurs" class="Mode_Setting">
<br>
<div id="pickrcontner">
<div class="containform3">
<a onclick="disableCache('rond')" id="cacherond" class="cache cn rondcache"></a>
<div class="containexte">
<a onclick="ableCache('rond')" class="containinte cb round"></a>
<div class="color-picker"></div>
</div>
</div>
<div class="containform3">
<a onclick="disableCache('carre')" id="cachecarre" class="cache cn carre"></a>
<div class="containexte">
<a onclick="ableCache('carre')" class="containinte cb carre"></a>
<div class="color-picker2"></div>
</div>
</div>
<div class="containform3">
<a onclick="disableCache('triangle')" id="cachetriangle" class="cache cn triangle"></a>
<div class="containexte">
<a onclick="ableCache('triangle')" class="containinte cb castriangle triangle"></a>
<div class="color-picker3"></div>
</div>
</div>
<div class="containform3">
<a onclick="disableCache('losange')" id="cachelosange" class="cache cn losange"></a>
<div class="containexte">
<a onclick="ableCache('losange')" class="containinte cb losange"></a>
<div class="color-picker4"></div>
</div>
</div>
<div class="containform3">
<a onclick="disableCache('croix')" id="cachecroix" class="cache cn croix"></a>
<div class="containexte">
<a onclick="ableCache('croix')" class="containinte cb croixinte"></a>
<div class="color-picker5"></div>
</div>
</div>
<div class="containform3">
<a onclick="disableCache('penta')" id="cachepenta" class="cache cn penta"></a>
<div class="containexte">
<a onclick="ableCache('penta')" class="containinte cb caspenta penta"></a>
<div class="color-picker6"></div>
</div>
</div>
<div class="containform3">
<a onclick="disableCache('hexa')" id="cachehexa" class="cache cn hexa"></a>
<div class="containexte">
<a onclick="ableCache('hexa')" class="containinte cb hexa"></a>
<div class="color-picker7"></div>
</div>
</div>
<div class="containform3">
<a onclick="disableCache('hocto')" id="cachehocto" class="cache cn hocto"></a>
<div class="containexte">
<a onclick="ableCache('hocto')" class="containinte cb hocto"></a>
<div class="color-picker8"></div>
</div>
</div>
</div>
<div id="formSize">
<div class="slider-container">
<span class="bar"><span class="fill"></span></span>
<input onchange="updateValue(this.value)" id="slider" type="range" class="slider" min="1" max="100" value="50">
<script>
var $slider = $("#slider");
var $fill = $(".bar .fill");
function setBar(){
$fill.css("width", $slider.val() + "%");
valRange = $slider.val();
changeContour(valRange);
}
$slider.on("input", setBar);
setBar();
</script>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- COLOR PICKER-->
<script>
let pannel = document.getElementById("pannel");
// Simple example, see optional options for more configuration.
var couleur1 = varColorToHex('--colorbase');
var couleur2 = varColorToHex('--colorcarre');
var couleur3 = varColorToHex('--colorone');
var couleur4 = varColorToHex('--colortwo');
var couleur5 = varColorToHex('--colorthree');
var couleur6 = varColorToHex('--colorfour');
var couleur7 = varColorToHex('--colorfive');
var couleur8 = varColorToHex('--colorsix');
const pickr = Pickr.create({
el: '.color-picker',
theme: 'classic', // or 'monolith', or 'nano'
default: couleur1,
swatches: [
'#df0024',
'#f3c300',
'#00ab9f',
'#2e6db4',
'#1bff7e',
'#fe1b00',
'#7f00ff',
'#29F073',
'#E6792F',
'#E6DA27',
'#E8695A',
'#2E294E',
'#64A6BD',
'#659157'
],
components: {
// Main components
preview: true,
opacity: false,
hue: true,
// Input / output Options
interaction: {
hex: false,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: true
}
}
});
const pickr2 = Pickr.create({
el: '.color-picker2',
theme: 'classic', // or 'monolith', or 'nano'
default: couleur2,
swatches: [
'#df0024',
'#f3c300',
'#00ab9f',
'#2e6db4',
'#1bff7e',
'#fe1b00',
'#7f00ff',
'#29F073',
'#E6792F',
'#E6DA27',
'#E8695A',
'#2E294E',
'#64A6BD',
'#659157'
],
components: {
// Main components
preview: true,
opacity: false,
hue: true,
// Input / output Options
interaction: {
hex: false,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: true
}
}
});
const pickr3 = Pickr.create({
el: '.color-picker3',
theme: 'classic', // or 'monolith', or 'nano'
default: couleur3,
swatches: [
'#df0024',
'#f3c300',
'#00ab9f',
'#2e6db4',
'#1bff7e',
'#fe1b00',
'#7f00ff',
'#29F073',
'#E6792F',
'#E6DA27',
'#E8695A',
'#2E294E',
'#64A6BD',
'#659157'
],
components: {
// Main components
preview: true,
opacity: false,
hue: true,
// Input / output Options
interaction: {
hex: false,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: true
}
}
});
const pickr4 = Pickr.create({
el: '.color-picker4',
theme: 'classic', // or 'monolith', or 'nano'
default: couleur4,
swatches: [
'#df0024',
'#f3c300',
'#00ab9f',
'#2e6db4',
'#1bff7e',
'#fe1b00',
'#7f00ff',
'#29F073',
'#E6792F',
'#E6DA27',
'#E8695A',
'#2E294E',
'#64A6BD',
'#659157'
],
components: {
// Main components
preview: true,
opacity: false,
hue: true,
// Input / output Options
interaction: {
hex: false,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: true
}
}
});
const pickr5 = Pickr.create({
el: '.color-picker5',
theme: 'classic', // or 'monolith', or 'nano'
default: couleur5,
swatches: [
'#df0024',
'#f3c300',
'#00ab9f',
'#2e6db4',
'#1bff7e',
'#fe1b00',
'#7f00ff',
'#29F073',
'#E6792F',
'#E6DA27',
'#E8695A',
'#2E294E',
'#64A6BD',
'#659157'
],
components: {
// Main components
preview: true,
opacity: false,
hue: true,
// Input / output Options
interaction: {
hex: false,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: true
}
}
});
const pickr6 = Pickr.create({
el: '.color-picker6',
theme: 'classic', // or 'monolith', or 'nano'
default: couleur6,
swatches: [
'#df0024',
'#f3c300',
'#00ab9f',
'#2e6db4',
'#1bff7e',
'#fe1b00',
'#7f00ff',
'#29F073',
'#E6792F',
'#E6DA27',
'#E8695A',
'#2E294E',
'#64A6BD',
'#659157'
],
components: {
// Main components
preview: true,
opacity: false,
hue: true,
// Input / output Options
interaction: {
hex: false,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: true
}
}
});
const pickr7 = Pickr.create({
el: '.color-picker7',
theme: 'classic', // or 'monolith', or 'nano'
default: couleur7,
swatches: [
'#df0024',
'#f3c300',
'#00ab9f',
'#2e6db4',
'#1bff7e',
'#fe1b00',
'#7f00ff',
'#29F073',
'#E6792F',
'#E6DA27',
'#E8695A',
'#2E294E',
'#64A6BD',
'#659157'
],
components: {
// Main components
preview: true,
opacity: false,
hue: true,
// Input / output Options
interaction: {
hex: false,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: true
}
}
});
const pickr8 = Pickr.create({
el: '.color-picker8',
theme: 'classic', // or 'monolith', or 'nano'
default: couleur8,
swatches: [
'#df0024',
'#f3c300',
'#00ab9f',
'#2e6db4',
'#1bff7e',
'#fe1b00',
'#7f00ff',
'#29F073',
'#E6792F',
'#E6DA27',
'#E8695A',
'#2E294E',
'#64A6BD',
'#659157'
],
components: {
// Main components
preview: true,
opacity: false,
hue: true,
// Input / output Options
interaction: {
hex: false,
rgba: false,
hsla: false,
hsva: false,
cmyk: false,
input: true,
clear: false,
save: true
}
}
});
//changement de couleur
pickr.on('change', (...args) => {
let color = args[0].toRGBA();
console.log(color);
let newcouleur = `rgba(${color[0]},${color[1]},${color[2]},${color[3]}`
document.documentElement.style.setProperty('--colorbase', newcouleur);
});
pickr2.on('change', (...args) => {
let color = args[0].toRGBA();
console.log(color);
let newcouleur = `rgba(${color[0]},${color[1]},${color[2]},${color[3]}`
document.documentElement.style.setProperty('--colorcarre', newcouleur);
});
pickr3.on('change', (...args) => {
let color = args[0].toRGBA();
console.log(color);
let newcouleur = `rgba(${color[0]},${color[1]},${color[2]},${color[3]}`
document.documentElement.style.setProperty('--colorone', newcouleur);
});
pickr4.on('change', (...args) => {
let color = args[0].toRGBA();
console.log(color);
let newcouleur = `rgba(${color[0]},${color[1]},${color[2]},${color[3]}`
document.documentElement.style.setProperty('--colortwo', newcouleur);
});
pickr5.on('change', (...args) => {
let color = args[0].toRGBA();
console.log(color);
let newcouleur = `rgba(${color[0]},${color[1]},${color[2]},${color[3]}`
document.documentElement.style.setProperty('--colorthree', newcouleur);
});
pickr6.on('change', (...args) => {
let color = args[0].toRGBA();
console.log(color);
let newcouleur = `rgba(${color[0]},${color[1]},${color[2]},${color[3]}`
document.documentElement.style.setProperty('--colorfour', newcouleur);
});
pickr7.on('change', (...args) => {
let color = args[0].toRGBA();
console.log(color);
let newcouleur = `rgba(${color[0]},${color[1]},${color[2]},${color[3]}`
document.documentElement.style.setProperty('--colorfive', newcouleur);
});
pickr8.on('change', (...args) => {
let color = args[0].toRGBA();
console.log(color);
let newcouleur = `rgba(${color[0]},${color[1]},${color[2]},${color[3]}`
document.documentElement.style.setProperty('--colorsix', newcouleur);
});
</script>
<div id="containpseudo">
<a onclick="lancerpartie()">
<a onclick="lancerpartie(); decompte();">
<div id="contourbuttonvalider">
<div class="bouttonvalider violet" >
<h1 id="textjouer">JOUER</h1>
</div>
</div>
</a>
</div>
<div id="choosemode">
<div id="conteneurmode">
<a>
<div id="modeprec">
<div id="triangleprec">
</div>
</div>
</a>
<div id="textdumode">
<h1 id="textmode">Solo</h1>
</div>
<a>
<div id="modesuiv">
<div id="trianglesuiv">
</div>
</div>
</a>
</div>
</div>
<div id="containplayers">
</div>
<div id="ContainBottom">
<!-- présentation des formes -->
</div>
<div class="mounts">
<img src="imgs/lightcloud.png" id="cloud">
<img src="imgs/mount1.png" id="mount1">
<img src="imgs/mount2.png" id="mount2">
</div>
</div>
<div id="pageGame">
<div class="menuhaut menu">
<div class="divmenu"></div>
<div class="divmenu">
<a onclick="retour()" class="bouttonMenuHaut">
<div class="containButtonForm">
<i class="fa fa-arrow-left logoboutton"></i>
</div>
</a>
</div>
<div class="divmenu">
<p id="affPoints">Score : 0</p>
</div>
<div class="divmenu logop2">
<a onclick="journuit()">
<img src="imgs/swishjour.png" id="imglogo2">
</a>
</div>
<div class="divmenu">
<a onclick="redistribuer()" class="bouttonMenuHaut">
<div class="containButtonForm">
<i class="fa fa-redo logoboutton"></i>
</div>
</a>
</div>
<div class="divmenu">
<a class="bouttonMenuHaut" onclick="chercheCombi2()">
<div class="containButtonForm">
<i class="fas fa-search logoboutton"></i>
</div>
</a>
</div>
<div class="divmenu">
<a onclick="testPourJeuClassique()" id="relancerbtn" class="bouttonMenuHaut">
<div class="containButtonForm">
<i class="fa fa-check logoboutton"></i>
</div>
</a>
</div>
</div>
<div id="progressbar">
<div id="indicateur"></div>
</div>
<div id="containcards" class="containcards">
</div>
<div>
<p id="affSolution"></p>
</div>
</div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -0,0 +1,61 @@
var FormeSelect = [];
var ListeCouleur = ["colorbase","colorcarre","colorone","colortwo","colorthree"]
var ListeClassForme = ["rond","carre","triangle","losange","croix","penta","hexa","hocto"]
//3 modes : 0 = couleurs // 1 = formes // 2 = personnaliser les cartes
var mode = 0;
var valRange;
function settingOpen(){
var elements = document.getElementsByClassName("pcr-button");
for (var i = 0; i < elements.length; i++) {
elements[i].classList.add(ListeClassForme[i]);
}
}
function disableCache(formName){
cacheName = "cache"+formName;
document.getElementById(cacheName).style.display = "none";
FormeSelect.push(form);
//document.getElementById("SettingName").innerHTML = FormeSelect.length;
}
function changeContour(value){
var newvalue = value * 0.055 + 1;
document.documentElement.style.setProperty('--z', newvalue+'vw');
//document.getElementById("SettingName").innerHTML = newvalue;
}
function ableCache(formName){
cacheName = "cache"+formName;
const pos = FormeSelect.indexOf(formName);
if (pos > -1) {
FormeSelect.splice(pos, 1);
}
document.getElementById(cacheName).style.display = "block";
}
function getVarColor(color){
var getvar = color;
getvar = getvar.substring(6,getvar.length-1);
return getvar;
}
function varColorToHex(color){
hex = getComputedStyle(document.documentElement).getPropertyValue(color);
hex = hex.substring(1,hex.length);
return hex;
}
function myFunction() {
/* Get the text field */
var copyText = document.getElementById("myInput");
/* Select the text field */
copyText.select();
copyText.setSelectionRange(0, 99999); /* For mobile devices */
/* Copy the text inside the text field */
document.execCommand("copy");
}

@ -0,0 +1,10 @@
<?php
if (isset($_POST['tabc'])) {
$myTable = $_POST['tab'];
echo($myTable);
echo("s");
print_r($_POST);
}
else{
echo 'd';
}

@ -43,6 +43,15 @@
z-index: 15; z-index: 15;
} }
#choosedimension {
height: 4vw;
width: 16vw;
position: absolute;
left: 42vw;
top: 55vh;
z-index: 15;
}
#conteneurmode { #conteneurmode {
width: 80%; width: 80%;
height: 2vw; height: 2vw;
@ -80,6 +89,14 @@
margin: 5% auto 0 auto; margin: 5% auto 0 auto;
} }
#textdimension {
font-family: Lucida Console, Arial Black, Arial;
font-size: 1vw;
color: #707070;
text-align: center;
margin: 5% auto 0 auto;
}
#formSize { #formSize {
margin: 0 auto; margin: 0 auto;
width: 100%; width: 100%;
@ -103,9 +120,11 @@
outline: none; outline: none;
background-color: transparent; background-color: transparent;
} }
.slider.container { .slider.container {
position: relative; position: relative;
} }
.slider-container .bar { .slider-container .bar {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
@ -132,6 +151,7 @@
.slider-container .slider::-moz-range-thumb:hover { .slider-container .slider::-moz-range-thumb:hover {
box-shadow: 0 0 0 10px rgba(98,0,238,.1); box-shadow: 0 0 0 10px rgba(98,0,238,.1);
} }
.slider-container .slider:active::-moz-range-thumb { .slider-container .slider:active::-moz-range-thumb {
box-shadow: 0 0 0 20px rgba(98,0,238,.2); box-shadow: 0 0 0 20px rgba(98,0,238,.2);
} }

@ -575,7 +575,7 @@
<div id="choosemode"> <div id="choosemode">
<div id="conteneurmode"> <div id="conteneurmode">
<a> <a onclick="modePrec()">
<div id="modeprec"> <div id="modeprec">
<div id="triangleprec"> <div id="triangleprec">
@ -586,7 +586,33 @@
<div id="textdumode"> <div id="textdumode">
<h1 id="textmode">Solo</h1> <h1 id="textmode">Solo</h1>
</div> </div>
<a> <a onclick="modeSuiv()">
<div id="modesuiv">
<div id="trianglesuiv">
</div>
</div>
</a>
</div>
</div>
<div id="choosedimension">
<div id="conteneurmode">
<a onclick="dimensionPrec()">
<div id="modeprec">
<div id="triangleprec">
</div>
</div>
</a>
<div id="textdumode">
<h1 id="textdimension">4 * 3</h1>
</div>
<a onclick="dimensionSuiv()">
<div id="modesuiv"> <div id="modesuiv">
<div id="trianglesuiv"> <div id="trianglesuiv">
@ -636,7 +662,7 @@
</a> </a>
</div> </div>
<div class="divmenu"> <div class="divmenu">
<a onclick="redistribuer()" class="bouttonMenuHaut"> <a onclick="redistribuerPlateau()" class="bouttonMenuHaut">
<div class="containButtonForm"> <div class="containButtonForm">
<i class="fa fa-redo logoboutton"></i> <i class="fa fa-redo logoboutton"></i>
</div> </div>
@ -650,7 +676,7 @@
</a> </a>
</div> </div>
<div class="divmenu"> <div class="divmenu">
<a onclick="testPourJeuClassique()" id="relancerbtn" class="bouttonMenuHaut"> <a onclick="testerLesCartes()" id="relancerbtn" class="bouttonMenuHaut">
<div class="containButtonForm"> <div class="containButtonForm">
<i class="fa fa-check logoboutton"></i> <i class="fa fa-check logoboutton"></i>
</div> </div>

@ -10,21 +10,58 @@ var darktercia = "#606060";
var carteselect = []; var carteselect = [];
var deckPartie = []; //Ensemble des cartes affichees a l'ecran var deckPartie = []; //Ensemble des cartes affichees a l'ecran
var TasDuJEU = []; // Ensemble de toutes les cartes presente dans le jeu var TasDuJEU = []; // Ensemble de toutes les cartes presente dans le jeu
var allMode = ["Solo", "Infini"]; // Défini tout les modes de Jeu
var allDimension = ["4 * 3", "3 * 3", "3 * 2"];
var selectionMode = 0;
var selectionDiemension = 0;
var lesPoints = 0; //Points du Joueur1 var lesPoints = 0; //Points du Joueur1
function modePrec() {
if (selectionMode == 0) {
selectionMode = allMode.length - 1;
} else {
selectionMode -= 1;
}
document.getElementById("textmode").textContent = "" + allMode[selectionMode]
}
function modeSuiv() {
if (selectionMode == allMode.length - 1) {
selectionMode = 0;
} else {
selectionMode += 1;
}
document.getElementById("textmode").textContent = "" + allMode[selectionMode]
}
function dimensionPrec() {
if (selectionDiemension == 0) {
selectionDiemension = allDimension.length - 1;
} else {
selectionDiemension -= 1;
}
document.getElementById("textdimension").textContent = "" + allDimension[selectionDiemension]
}
function dimensionSuiv() {
if (selectionDiemension == allDimension.length - 1) {
selectionDiemension = 0;
} else {
selectionDiemension += 1;
}
document.getElementById("textdimension").textContent = "" + allDimension[selectionDiemension]
}
class Carte { class Carte {
constructor(id, allFigure/*,row,column,nbForme*/) { //a decommenter quand il y aura des prametres de partie constructor(id, allFigure, nbRow, nbColumn/*,nbForme*/) { //a decommenter quand il y aura des prametres de partie
//Attribut de Classe //Attribut de Classe
this.identifiant = id; this.identifiant = id;
this.row = 4 /*row*/; this.row = nbRow;
this.column = 3 /*column*/; this.column = nbColumn;
this.Matrice = creaMatrice(this.row, this.column); this.Matrice = creaMatrice(nbRow, nbColumn);
this.SesFigures = []; this.SesFigures = [];
for (var i = 0; i < allFigure.length; i++) { for (var i = 0; i < allFigure.length; i++) {
this.SesFigures.push(allFigure[i]); this.SesFigures.push(allFigure[i]);
@ -260,6 +297,7 @@ const TypeFigure = {
function journuit() { function journuit() {
//mode jour //mode jour
mode = mode + 1;
if (mode % 2 == 0) { if (mode % 2 == 0) {
//changer logo swish //changer logo swish
document.getElementById("imglogo").src = "imgs/swishjour.png"; document.getElementById("imglogo").src = "imgs/swishjour.png";
@ -291,18 +329,39 @@ function journuit() {
document.documentElement.style.setProperty('--lightsedonca', darkseconda); document.documentElement.style.setProperty('--lightsedonca', darkseconda);
document.documentElement.style.setProperty('--lighttercia', darktercia); document.documentElement.style.setProperty('--lighttercia', darktercia);
} }
mode = mode + 1;
} }
//=================================================================================== //===================================================================================
//FONCTION GESTION DE GAME //FONCTION GESTION DE GAME
function lancerpartie() { function lancerpartie() {
document.getElementById("pageAccueil").style.visibility = "hidden"; var ready = true;
//fonction de creation de partie a changer en fonction du test voulu //fonction de creation de partie a changer en fonction du test voulu
creePartieClassique(); if (selectionMode == 0) {
if (selectionDiemension == 0) {
creePartieClassique3_4();
} else if (selectionDiemension == 1) {
ready = false;
window.alert("Mode de Jeu indisponible pour le moment")
} else if (selectionDiemension == 2) {
ready = false;
window.alert("Mode de Jeu indisponible pour le moment")
}
} else if (selectionMode == 1) {
if (selectionDiemension == 0) {
creePartieInfini(4, 3);
} else if (selectionDiemension == 1) {
creePartieInfini(3, 3);
} else if (selectionDiemension == 2) {
creePartieInfini(3, 2);
}
}
if (ready) {
document.getElementById("pageAccueil").style.visibility = "hidden";
document.getElementById("pageGame").style.visibility = "visible"; document.getElementById("pageGame").style.visibility = "visible";
} }
}
function retour() { function retour() {
document.getElementById("pageAccueil").style.visibility = "visible"; document.getElementById("pageAccueil").style.visibility = "visible";
@ -319,6 +378,18 @@ function rechargerGAME() {
} }
} }
function redistribuerPlateau() {
if (selectionMode == 0) {
redistribuer();
} else if (selectionMode == 1) {
for (var i = 0; i < 16; i++) {
remplacerLaCarte(deckPartie[i])
}
}
afficherCartes(deckPartie);
}
function redistribuer() { function redistribuer() {
deckPartie = []; deckPartie = [];
for (var i = 0; i < 16; i++) { for (var i = 0; i < 16; i++) {
@ -360,13 +431,13 @@ function genererTouteslesCartes3_4Possibles() {
AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, 0, j)); AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, 0, j));
if (i != 3 * j) { if (i != 3 * j) {
AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, i % 3, Math.floor(i / 3))); AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, i % 3, Math.floor(i / 3)));
var uneCarte = new Carte(deckPartie.length + 1, AllFigure); var uneCarte = new Carte(deckPartie.length + 1, AllFigure, 4, 3);
deckPartie.push(uneCarte); deckPartie.push(uneCarte);
if (!doublonInterdit(uneCarte)) { if (!doublonInterdit(uneCarte)) {
AllFigure = []; AllFigure = [];
AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, 0, j)); AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, 0, j));
AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, i % 3, Math.floor(i / 3))); AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, i % 3, Math.floor(i / 3)));
var unDoublon = new Carte(deckPartie.length + 1, AllFigure); var unDoublon = new Carte(deckPartie.length + 1, AllFigure, 4, 3);
deckPartie.push(unDoublon); deckPartie.push(unDoublon);
} }
} }
@ -379,13 +450,13 @@ function genererTouteslesCartes3_4Possibles() {
if (i != 3 * j + 1) { if (i != 3 * j + 1) {
if (i != 2 && i != 5 && i != 8 && i != 11) { if (i != 2 && i != 5 && i != 8 && i != 11) {
AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, i % 3, Math.floor(i / 3))); AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, i % 3, Math.floor(i / 3)));
var uneCarte = new Carte(deckPartie.length + 1, AllFigure); var uneCarte = new Carte(deckPartie.length + 1, AllFigure, 4, 3);
deckPartie.push(uneCarte); deckPartie.push(uneCarte);
if (!doublonInterdit(uneCarte)) { if (!doublonInterdit(uneCarte)) {
AllFigure = []; AllFigure = [];
AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, 1, j)); AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, 1, j));
AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, i % 3, Math.floor(i / 3))); AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, i % 3, Math.floor(i / 3)));
var unDoublon = new Carte(deckPartie.length + 1, AllFigure); var unDoublon = new Carte(deckPartie.length + 1, AllFigure, 4, 3);
deckPartie.push(unDoublon); deckPartie.push(unDoublon);
} }
} }
@ -404,7 +475,7 @@ function afficherCartes(Liste) {
} }
} }
function creePartieClassique() { function creePartieClassique3_4() {
TasDuJEU = genererTouteslesCartes3_4Possibles(); TasDuJEU = genererTouteslesCartes3_4Possibles();
deckPartie = []; deckPartie = [];
for (var i = 0; i < TasDuJEU.length; i++) { for (var i = 0; i < TasDuJEU.length; i++) {
@ -443,7 +514,7 @@ function creePartieClassique() {
afficherCartes(deckPartie); afficherCartes(deckPartie);
} }
function creePartieInfini() { function creePartieInfini(nbRow, nbColum) {
deckPartie = []; deckPartie = [];
carteselect = []; carteselect = [];
while (document.getElementById("containcards").firstElementChild != null) { while (document.getElementById("containcards").firstElementChild != null) {
@ -454,20 +525,20 @@ function creePartieInfini() {
var AllFigure = []; var AllFigure = [];
var Cox1, Coy1, Cox2, Coy2; var Cox1, Coy1, Cox2, Coy2;
Cox1 = getRandom(0, 2); Cox1 = getRandom(0, nbColum - 1);
Coy1 = getRandom(0, 3); Coy1 = getRandom(0, nbRow - 1);
AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, Cox1, Coy1)); AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, Cox1, Coy1));
Cox2 = getRandom(0, 2); Cox2 = getRandom(0, nbColum - 1);
Coy2 = getRandom(0, 3); Coy2 = getRandom(0, nbRow - 1);
while (Cox2 == Cox1 && Coy1 == Coy2) { while (Cox2 == Cox1 && Coy1 == Coy2) {
Cox2 = getRandom(0, 2); Cox2 = getRandom(0, nbColum - 1);
Coy2 = getRandom(0, 3); Coy2 = getRandom(0, nbRow - 1);
} }
AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, Cox2, Coy2)); AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, Cox2, Coy2));
//Code de Generation de Figure //Code de Generation de Figure
var uneCarte = new Carte(j, AllFigure); var uneCarte = new Carte(j, AllFigure, nbRow, nbColum);
deckPartie.push(uneCarte); deckPartie.push(uneCarte);
@ -525,20 +596,20 @@ function remplacerLaCarte(uneCarte) {
var AllFigure = []; var AllFigure = [];
var Cox1, Coy1, Cox2, Coy2; var Cox1, Coy1, Cox2, Coy2;
Cox1 = getRandom(0, 2); Cox1 = getRandom(0, uneCarte.column - 1);
Coy1 = getRandom(0, 3); Coy1 = getRandom(0, uneCarte.row - 1);
AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, Cox1, Coy1)); AllFigure.push(new Figure(new Array(TypeFigure.Petit), FormeFigure.Rond, Cox1, Coy1));
Cox2 = getRandom(0, 2); Cox2 = getRandom(0, uneCarte.column - 1);
Coy2 = getRandom(0, 3); Coy2 = getRandom(0, uneCarte.row - 1);
while (Cox2 == Cox1 && Coy1 == Coy2) { while (Cox2 == Cox1 && Coy1 == Coy2) {
Cox2 = getRandom(0, 2); Cox2 = getRandom(0, uneCarte.column - 1);
Coy2 = getRandom(0, 3); Coy2 = getRandom(0, uneCarte.row - 1);
} }
AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, Cox2, Coy2)); AllFigure.push(new Figure(new Array(TypeFigure.Moyen), FormeFigure.Rond, Cox2, Coy2));
//Code de Generation de Figure //Code de Generation de Figure
var newCarte = new Carte(pos + 1, AllFigure); var newCarte = new Carte(pos + 1, AllFigure, uneCarte.row, uneCarte.column);
deckPartie[pos] = newCarte; deckPartie[pos] = newCarte;
} }
@ -584,20 +655,21 @@ function creaMatriceVierge(row, column) {
function creaMatrice(row, column) { function creaMatrice(row, column) {
var myMatrice = creaMatriceVierge(row, column); var myMatrice = creaMatriceVierge(row, column);
//window.alert(myMatrice)
var Cox1, Coy1, Cox2, Coy2; var Cox1, Coy1, Cox2, Coy2;
Cox1 = getRandom(0, 2); Cox1 = getRandom(0, column - 1);
Coy1 = getRandom(0, 3); Coy1 = getRandom(0, row - 1);
myMatrice[Cox1][Coy1] = 1; myMatrice[Cox1][Coy1] = 1;
Cox2 = getRandom(0, 2); Cox2 = getRandom(0, column - 1);
Coy2 = getRandom(0, 3); Coy2 = getRandom(0, row - 1);
while (Cox2 == Cox1 && Coy1 == Coy2) { while (Cox2 == Cox1 && Coy1 == Coy2) {
Cox2 = getRandom(0, 2); Cox2 = getRandom(0, column - 1);
Coy2 = getRandom(0, 3); Coy2 = getRandom(0, row - 1);
} }
myMatrice[Cox2][Coy2] = 2; myMatrice[Cox2][Coy2] = 2;
@ -664,7 +736,7 @@ function chercherCombinaison() {
} }
function test() { function test() {
printCombinations([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], 3); printCombinations([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], 12);
} }
function printCombinations(array, p) { function printCombinations(array, p) {
@ -685,9 +757,9 @@ function printCombinations(array, p) {
for (var j = 0; j < combinations.length; j++) { for (var j = 0; j < combinations.length; j++) {
combTest.push(deckPartie[combinations[j]]); combTest.push(deckPartie[combinations[j]]);
//window.alert("Matrice ajouté num" + j + " :" + deckPartie[combinations[j]].getMatrice); //window.alert("Matrice ajouté num" + j + " :" + deckPartie[combinations[j]].getMatrice);
//console.log("i"+j +" :"+ combinations[j]); console.log("i" + j + " :" + combinations[j]);
} }
//console.log("matrice début ex: "+combTest[0].getMatrice); console.log("matrice début ex: " + combTest[0].getMatrice);
console.log("Cartes selectionnées :(en partant de indice 0) :") console.log("Cartes selectionnées :(en partant de indice 0) :")
console.log(combinations.join(" ")); console.log(combinations.join(" "));
console.log("----- taille :" + combTest.length + " -------"); console.log("----- taille :" + combTest.length + " -------");
@ -698,6 +770,7 @@ function printCombinations(array, p) {
} }
} }
run(0, 0); run(0, 0);
window.alert("fin test " + k + " cartes")
} }
window.alert("nb combi :" + Cptsolution); window.alert("nb combi :" + Cptsolution);
} }
@ -911,7 +984,13 @@ function decompte() {
progressnum.innerHTML = cpt; progressnum.innerHTML = cpt;
} }
function testerLesCartes() {
if (selectionMode == 0) {
testPourJeuClassique();
} else if (selectionMode == 1) {
testPourJeuInfini();
}
}
function testPourJeuInfini() { function testPourJeuInfini() {
@ -937,16 +1016,17 @@ function testPourJeuInfini() {
for (var i = 0; i < tab.length; i++) { for (var i = 0; i < tab.length; i++) {
if (tab[i].code == carteselect.length) { if (tab[i].code == carteselect.length) {
solution = false; solution = false;
lesPoints += carteselect.length;
document.getElementById("affPoints").textContent = 'Score : ' + lesPoints;
changerlesCartes(); changerlesCartes();
} }
} }
if (solution) { if (solution) {
window.alert("Rien trouve chef !!!"); document.getElementById("affSolution").textContent = 'Aucune solution trouvée...';
} }
if (!solution) { if (!solution) {
window.alert("J'ai une solution chef !!!!"); document.getElementById("affSolution").textContent = 'Assemblage de ' + copie.length + ' cartes trouvé !';
} }
window.alert(TasDuJEU.length)
} }
} catch (e) { } catch (e) {
window.alert(e); window.alert(e);
@ -985,7 +1065,7 @@ function testPourJeuClassique() {
} }
} }
if (solution) { if (solution) {
document.getElementById("affSolution").textContent = 'Aucune solution trouvée...' document.getElementById("affSolution").textContent = 'Aucune solution trouvée...';
} }
if (!solution) { if (!solution) {
document.getElementById("affSolution").textContent = 'Assemblage de ' + copie.length + ' cartes trouvé ! Il reste encore ' + TasDuJEU.length + ' cartes !'; document.getElementById("affSolution").textContent = 'Assemblage de ' + copie.length + ' cartes trouvé ! Il reste encore ' + TasDuJEU.length + ' cartes !';
@ -1015,7 +1095,7 @@ function copieCarte(uneCarte) {
for (var i = 0; i < uneCarte.SesFigures.length; i++) { for (var i = 0; i < uneCarte.SesFigures.length; i++) {
AllFigure.push(new Figure(uneCarte.SesFigures[i].type, uneCarte.SesFigures[i].forme, uneCarte.SesFigures[i].X, uneCarte.SesFigures[i].Y)); AllFigure.push(new Figure(uneCarte.SesFigures[i].type, uneCarte.SesFigures[i].forme, uneCarte.SesFigures[i].X, uneCarte.SesFigures[i].Y));
} }
var carte = new Carte(uneCarte.getIdentifiant, AllFigure); var carte = new Carte(uneCarte.getIdentifiant, AllFigure, uneCarte.row, uneCarte.column);
carte.Matrice = copieMatrice(uneCarte.Matrice, uneCarte.row, uneCarte.column); carte.Matrice = copieMatrice(uneCarte.Matrice, uneCarte.row, uneCarte.column);
return carte; return carte;
} }

Loading…
Cancel
Save