yasevret 4 years ago
commit 69a7598549

@ -4,6 +4,7 @@ class MyDB extends SQLite3
function __construct()
{
$this->open('mysqlitedb.db');
$this->exec('CREATE TABLE partie(Id STRING,un STRING,deux STRING, trois STRING,quatre STRING,cinq STRING,six STRING,sept STRING,huit STRING,neuf STRING)');
}
}
@ -27,3 +28,15 @@ function CreerPatie(string $bd,string $id){
function SupprimerLigne(string $bd,string $id){
$suppression = $bd->query('DELETE FROM partie where Id="'.$id.'" ');
}
function Sup1h($datetime)
{
$dateactuelles = date('h:i');
$dateactuelle= new DateTime($dateactuelles);
$interval = $datetime->diff($dateactuelle);
echo $interval->format('%H');//00 years
if($interval>1){
echo "supp";
}
}
$datetime1 = new DateTime('12:55');
Sup1h($datetime1);

@ -376,25 +376,7 @@ label:active:after {
z-index: 10;
}
#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;
}
#modeprec{
height: 100%;
@ -417,31 +399,9 @@ label:active:after {
left: 15%;
}
#textmode {
font-family: Lucida Console, Arial Black, Arial;
font-size: 1vw;
color: #707070;
text-align:center;
margin: 5% auto 0 auto;
}
#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;
}
#buttonadd {
position: absolute;

@ -15,11 +15,6 @@
justify-content: center;
}
.divmenu {
width: 10vw;
height: inherit;
margin-right: 1vw;
}
.retourstp {
position: absolute;
@ -30,13 +25,6 @@
top:-3vw;
}
#affPoints {
text-align: center;
font-family: Montserrat, impact, Arial Black;
font-size: 2vw;
margin-top: 1.2vw;
color: var(--lightsedonca);
}
#affSolution {
text-align: center;
@ -95,3 +83,27 @@
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;
}

@ -45,6 +45,13 @@
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;

@ -1,6 +1,9 @@
/*Ecran*/
@media screen and (min-width: 992px) {
:root{
--taille : 10vw;
}
/*PARTIE FORMES*/
.containform3 {
@ -31,6 +34,52 @@
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%;
@ -107,6 +156,20 @@
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;
@ -127,7 +190,7 @@
.flex-item {
background: var(--lightsedonca);
width: 10vw;
width: var(--taille);
border-radius: 0.75vw;
padding-right: 0.15vw;
padding-left: 0.15vw;
@ -154,7 +217,7 @@
overflow-x: auto;
display: flex;
flex-wrap: wrap;
padding-top: 7vw;
padding-top: 1vw;
justify-content: center;
}

@ -1,6 +1,10 @@
/*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));
@ -93,7 +97,6 @@
width: 20vh;
padding-top: 1vh;
position: relative;
left: 27vw;
}
.txt {
@ -159,7 +162,128 @@
position: absolute;
font-size: 10vw;
margin-top: 0.2vw;
margin-left: 12.5vw;
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);
}
}

@ -87,7 +87,7 @@
<br>
<div id="pickrcontner">
<div class="containform3">
<a onclick="disableCache('rond')" id="cacherond" class="cache cn rond"></a>
<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>
@ -563,6 +563,7 @@
<div id="containpseudo">
<a onclick="lancerpartie()">
<a onclick="lancerpartie(); decompte();">
<div id="contourbuttonvalider">
<div class="bouttonvalider violet" >
<h1 id="textjouer">JOUER</h1>
@ -642,7 +643,7 @@
</a>
</div>
<div class="divmenu">
<a class="bouttonMenuHaut" onclick="test()">
<a class="bouttonMenuHaut" onclick="chercheCombi2()">
<div class="containButtonForm">
<i class="fas fa-search logoboutton"></i>
</div>
@ -658,6 +659,10 @@
</div>
<div id="progressbar">
<div id="indicateur"></div>
</div>
<div id="containcards" class="containcards">
</div>

@ -307,6 +307,7 @@ function lancerpartie() {
function retour() {
document.getElementById("pageAccueil").style.visibility = "visible";
document.getElementById("pageGame").style.visibility = "hidden";
window.location.reload();
}
function rechargerGAME() {
@ -728,7 +729,6 @@ function testCombinaison(DeckTeste, combi, Cptsolution) {
return Cptsolution;
}
function chercheCombi2() {
var Cptsolution = 0;
@ -786,6 +786,7 @@ function chercheCombi3() {
for (var k = 0; k < 15 - j; k++) { //Partie movible 2
var DeckTeste = [];
var tabCode = [];
var tab = [];
@ -816,6 +817,39 @@ function chercheCombi3() {
tabCode.push(tab[h].code);
}
var DeckTeste = [];
var tabCode = [];
var tab = [];
var copie = [];
copie.splice(0, DeckTeste.length);
DeckTeste.splice(0, DeckTeste.length);
tab.splice(0, DeckTeste.length);
tabCode.splice(0, DeckTeste.length);
DeckTeste.push(deckPartie[i]);
DeckTeste.push(deckPartie[j + i + 1]);
DeckTeste.push(deckPartie[k + j + i + 2]);
for (var h = 0; h < DeckTeste.length; h++) {
copie.push(DeckTeste[i]);
}
for (var z = 0; z < DeckTeste; z++) {
if (DeckTeste[z] == null) {
window.alert("Pb carte null :" + i + j + k);
}
}
tab = AssemblageARBRE(copieListeDeCarte(DeckTeste), copieCarte(DeckTeste[0]));
var solution = true;
for (var h = 0; h < tab.length; h++) {
tabCode.push(tab[h].code);
}
for (var g = 0; g < tab.length; g++) {
if (tab[g].code == DeckTeste.length) {
solution = false;
@ -838,6 +872,49 @@ function chercheCombi3() {
//=================================================================================
//FONCTION DE TEST => permet de tester des fonctionnalite via le bouton VALIDER
var cpt = 1100;
var x;
var itv = 0;
function decompte() {
var progressnum = document.getElementById("progressnum");
var indicateur = document.getElementById("indicateur");
if (cpt >= 0) {
cpt--;
x = setTimeout("decompte()", 100);
}
else {
clearTimeout(x);
}
if (cpt == 0) {
window.alert("fin du jeu");
retour();
window.location.reload();
clearInterval(itv);
}
if(cpt < 550) {
document.getElementById("indicateur").style.backgroundColor = "orange";
}
if(cpt < 366) {
document.getElementById("indicateur").style.backgroundColor = "red";
}
indicateur.style.width = cpt + "px";
progressnum.innerHTML = cpt;
}
function testPourJeuInfini() {
try {
if (carteselect.length == 0) {
@ -902,6 +979,7 @@ function testPourJeuClassique() {
for (var i = 0; i < tab.length; i++) {
if (tab[i].code == carteselect.length) {
solution = false;
cpt = cpt + 20 * copie.length;
lesPoints += carteselect.length;
document.getElementById("affPoints").textContent = 'Score : ' + lesPoints;
changerlesCartesDeTasDeJeu();

Loading…
Cancel
Save