probleme affichage regle

master
readhame 5 years ago
parent cb5f920ac2
commit d4d0a5338f

@ -126,7 +126,7 @@
<workItem from="1594896282228" duration="4161000" />
<workItem from="1594923234569" duration="65000" />
<workItem from="1594923470651" duration="68000" />
<workItem from="1594981177567" duration="235000" />
<workItem from="1594981177567" duration="6119000" />
</task>
<servers />
</component>

@ -33,7 +33,7 @@ h1 {
.card {
display: table-cell;
width: 170px;
height: 120px;
height: 119px;
border: 2px solid #ccc;
background: #F5F5F5;
}
@ -51,59 +51,68 @@ h1 {
height: auto;
width: auto;
transform: rotate(90deg);
position: fixed;
}
.game-board2 {
margin-top: -2%;
margin-left: 30%;
margin-top: -1%;
margin-left: 15%;
height: 800px;
width: 780px;
transform: rotate(90deg);
position: fixed;
}
.game-board {
margin-top: -5%;
margin-left: 29%;
margin-top: -3%;
margin-left: 16%;
height: 700px;
width: 600px;
transform: rotate(90deg);
position: fixed;
}
.game-board0 {
margin-top: 30%;
height: auto;
width: auto;
margin-top: 5%;
margin-left: 12%;
height: 595px;
width: 600px;
transform: rotate(90deg);
position: fixed;
}
.game-board1 {
margin-top: -4%;
margin-top: -3%;
height: 800px;
width: 700px;
margin-left: 40%;
margin-left: 25%;
transform: rotate(90deg);
position: fixed;
}
.game-boardHS0 {
margin-top: 20.1%;
margin-top: 5%;
margin-left: 10%;
height: auto;
width: auto;
transform: rotate(90deg);
position: fixed;
}
.game-boardHS {
margin-top: -1%;
margin-left: 35%;
margin-left: 17%;
height: 800px;
width: 800px;
transform: rotate(90deg);
position: fixed;
}
.game-boardHS1 {
margin-top: -4.5%;
margin-left: 41%;
margin-top: -0.5%;
margin-left: 20%;
height: 800px;
width: 800px;
transform: rotate(90deg);
position: fixed;
}

@ -205,6 +205,7 @@ var Game = {
dataType: 'json',
success: function (data) {
self.cardsHS = data;
//self.existingHyperSet();
self.displayCardsHS.call(self);
self.setCardListenersHS();
//self.setPageListenersHS();
@ -964,12 +965,12 @@ var Game = {
fills1.splice(0,1,carte1.fill);
fills1.splice(1,1,carte2.fill);
fills1.splice(2,1,carte3.color);
fills1.splice(2,1,carte3.fill);
fills1.splice(3, 1, card4[0].fill);
numbers1.splice(0,1,carte1.number);
numbers1.splice(1,1,carte2.number);
numbers1.splice(2,1,carte3.color);
numbers1.splice(2,1,carte3.number);
numbers1.splice(3, 1, card4[0].number);
@ -1017,7 +1018,113 @@ var Game = {
*/
/*cardInListOfCardsHS : function (shapes, colors, fills, numbers){
var colorsall= $.map(this.cardsHS, function(el) { return el.color;});
var shapesall = $.map(this.cardsHS, function(el) { return el.shape; });
var fillsall= $.map(this.cardsHS,function(el) { return el.fill; });
var numbersall = $.map(this.cardsHS, function(el) { return el.number;});
var a = 0;
for (a =0; a < this.cardsHS.length; a++) {
console.log(shapes, shapesall[a], colors, colorsall[a],fills,fillsall[a], numbers, numbersall[a]);
return shapes === shapesall[a] && colors === colorsall[a] && fills === fillsall[a] && numbers === numbersall[a];
}
},
existingHyperSet: function() {
var colors1 = [];
var shapes1 =[];
var fills1= [];
var numbers1= [];
var colors2 = [];
var shapes2 =[];
var fills2= [];
var numbers2= [];
var self = this;
var cartes = self.cardsHS;
var cartes1 = cartes;
var cartes2 = cartes;
var carte1, carte3;
var carte2;
var card4 = [];
var cardVirtual = [];
var tCards = [];
var i, j, a, k;
var colorsall= $.map(this.cardsHS, function(el) { return el.color;});
var shapesall = $.map(this.cardsHS, function(el) { return el.shape; });
var fillsall= $.map(this.cardsHS,function(el) { return el.fill; });
var numbersall = $.map(this.cardsHS, function(el) { return el.number;});
for(i=0; i < cartes.length-2; i++) {
for (j = i + 1; j < cartes1.length - 1; j++) {
for (k = j + 1; k < cartes2.length; k++) {
carte1 = cartes[i];
carte2 = cartes1[j];
carte3 = cartes2[k];
tCards[0] = carte1;
tCards[1]= carte2;
cardVirtual = this.generateVirtualCard34(tCards);
tCards[0]= carte3;
tCards[1] = cardVirtual[0];
card4 = this.generateVirtualCard34(tCards);
colors1.splice(0, 1, carte3.color);
colors1.splice(1, 1, card4[0].color);
colors1.splice(2, 1, cardVirtual[0].color);
shapes1.splice(0, 1, carte3.shape);
shapes1.splice(1, 1, card4[0].shape);
shapes1.splice(2, 1, cardVirtual[0].shape);
fills1.splice(0, 1, carte3.fill);
fills1.splice(1, 1, card4[0].fill);
fills1.splice(2, 1, cardVirtual[0].fill);
numbers1.splice(0, 1, carte3.number);
numbers1.splice(1, 1, card4[0].number);
numbers1.splice(2, 1, cardVirtual[0].number);
//console.log('Card4 : ' + shapes1[0] + colors1[0] +fills1[0]+ numbers1[0] );
//if(this.cardInListOfCards44(shapes1[3],colors1[3],fills1[3],numbers1[3] )){}
for (a = k+1; a < self.cardsHS.length; a++) {
if (shapes1[2] !== undefined && colors1[2] !== undefined && fills1[2] !== undefined && numbers1[2] !== undefined) {
if (shapes1[1] !== undefined && colors1[1] !== undefined && fills1[1] !== undefined && numbers1[1] !== undefined) {
if(this.cardInListOfCardsHS(shapes1[1],colors1[1],fills1[1],numbers1[1] )){
console.log(this.cardInListOfCardsHS(shapes1[1],colors1[1],fills1[1],numbers1[1] ));
self.setHS = self.setHS + 1;
}
}
}
}
}
}
}
this.$nbSetsHS.html(self.setHS);
},
*/

Loading…
Cancel
Save