verifiacation des modes plus factorisation code

master
readhame 5 years ago
parent 83e51ab07f
commit 973aae7b37

@ -116,7 +116,9 @@
<workItem from="1594293015930" duration="6902000" />
<workItem from="1594380519697" duration="13036000" />
<workItem from="1594636024584" duration="12177000" />
<workItem from="1594657007348" duration="996000" />
<workItem from="1594657007348" duration="3692000" />
<workItem from="1594723662831" duration="6488000" />
<workItem from="1594742882358" duration="731000" />
</task>
<servers />
</component>
@ -160,10 +162,10 @@
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="623" height="498" key="SwitcherDM/0.0.1920.1040@0.0.1920.1040" timestamp="1593600080207" />
<state x="1136" y="344" key="com.intellij.ide.util.TipDialog" timestamp="1594119832865">
<state x="1136" y="344" key="com.intellij.ide.util.TipDialog" timestamp="1594742882548">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state x="1136" y="344" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1594119832865" />
<state x="1136" y="344" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1594742882548" />
<state x="701" y="162" key="refactoring.ChangeSignatureDialog" timestamp="1593090265720">
<screen x="0" y="0" width="1920" height="1040" />
</state>

@ -113,7 +113,7 @@ h1 {
height: 68px;
-webkit-mask-repeat: no-repeat;
-webkit-mask-position: 15px;
margin-top: 22%;
margin-top: 16%;
}

@ -77,7 +77,7 @@
<div id='game0' class="wrapper" style="display: none;">
<h1>Set 3x3 </h1>
<h1>Set 3x3 OK</h1>
<div class=" back-btn small-btn">
<img class="small-btn" id="previousBtn0" onclick="goSelectMode0()" src="vues/images/previous.png">
</div>
@ -91,7 +91,7 @@
<div id='game' class="wrapper" style="display: none;">
<h1>Set 3x4 </h1>
<h1>Set 3x4 OK </h1>
<div class=" back-btn small-btn">
<img class="small-btn" id="previousBtn1" onclick="goSelectMode()" src="vues/images/previous.png">
</div>
@ -102,7 +102,7 @@
</div>
<div id='game1' class="wrapper" style="display: none;">
<h1>Set 3x5</h1>
<h1>Set 3x5 OK </h1>
<div class=" back-btn small-btn">
<img class="small-btn" id="previousBtn2" onclick="goSelectMode1()" src="vues/images/previous.png">
</div>
@ -115,7 +115,7 @@
</div>
<div id='game2' class="wrapper" style="display: none;">
<h1>Set 4x4</h1>
<h1>Set 4x4 OK</h1>
<div class=" back-btn small-btn">
<img class="small-btn" id="previousBtn3" onclick="goSelectMode2()" src="vues/images/previous.png">
</div>
@ -126,7 +126,7 @@
<div class="game-board2" data-display="game-board2"></div>
</div>
<div id='game3' class="wrapper" style="display: none;">
<h1>Set 4x5</h1>
<h1>Set 4x5 Bordures + à tester</h1>
<div class=" back-btn small-btn">
<img class="small-btn" id="previousBtn4" onclick="goSelectMode3()" src="vues/images/previous.png">
</div>
@ -137,7 +137,7 @@
<div class="game-board" data-display="game-board3"></div>
</div>
<div id='game4' class="wrapper" style="display: none;">
<h1>Set 5x5</h1>
<h1>Set 5x5 Bordures + à tester </h1>
<div class=" back-btn small-btn">
<img class="small-btn" id="previousBtn5" onclick="goSelectMode4()" src="vues/images/previous.png">
</div>
@ -158,7 +158,7 @@
<div id='gameHS' class="wrapper" style="display: none;">
<h1>HyperSet 3x4 </h1>
<h1>HyperSet 3x4 OK</h1>
<div class=" back-btn small-btn">
<img class="small-btn" onclick="goSelectModeHyperSet()" src="vues/images/previous.png">
</div>
@ -171,7 +171,7 @@
<div id='gameHS0' class="wrapper" style="display: none;">
<h1>HyperSet 3x3 </h1>
<h1>HyperSet 3x3 OK </h1>
<div class=" back-btn small-btn">
<img class="small-btn" onclick="goSelectModeHyperSet0()" src="vues/images/previous.png">
</div>
@ -182,7 +182,7 @@
<div class="game-boardHS0" data-display="game-boardHS0"></div>
</div>
<div id='gameHS1' class="wrapper" style="display: none;">
<h1>HyperSet 3x5 </h1>
<h1>HyperSet 3x5 OK</h1>
<div class=" back-btn small-btn">
<img class="small-btn" onclick="goSelectModeHyperSet1()" src="vues/images/previous.png">
</div>
@ -194,7 +194,7 @@
</div>
<div id='gameHS2' class="wrapper" style="display: none;">
<h1>HyperSet 4x4 </h1>
<h1>HyperSet 4x4 OK </h1>
<div class=" back-btn small-btn">
<img class="small-btn" onclick="goSelectModeHyperSet2()" src="vues/images/previous.png">
</div>

@ -1192,7 +1192,6 @@ var Game = {
for (a = j+1; a<this.cards1.length; a++) {
if (shapes1[2] === shapesall[a] && colors1[2] === colorsall[a] && fills1[2] === fillsall[a] && borders1[2] === bordersall[a] && numbers1[2] === numbersall[a]) {
if (this.isSet(shapes1) && this.isSet(colors1) && this.isSet(fills1) && this.isSet(borders1) && this.isSet(numbers1)) {
console.log(shapes1, colors1, fills1, borders1, numbers1);
self.set1 = self.set1 + 1;
}
}
@ -1640,17 +1639,23 @@ var Game = {
}
}
for (a = k + 1; a < self.cards2.length; a++) {
//if(this.cardInListOfCards44(shapes1[3],colors1[3],fills1[3],numbers1[3] )){}
for (a = k+1; a < self.cards2.length; a++) {
if (shapes1[3] === shapesall[a] && colors1[3] === colorsall[a] && fills1[3] === fillsall[a] && numbers1[3] === numbersall[a]) {
if (this.isSet4(shapes1) && this.isSet4(colors1) && this.isSet4(fills1) && this.isSet4(numbers1)) {
console.log('Set 4x4 : ');
console.log(shapes1, colors1, fills1, numbers1);
self.set2 = self.set2 + 1;
}
}
}
}
}
}
console.log('-----------------------------------------------------------------');
this.$nbSets2.html(self.set2);
},
@ -1658,11 +1663,23 @@ var Game = {
/*
cardInListOfCards44 : function (shapes, colors, fills, numbers){
var colorsall= $.map(this.cards2, function(el) { return el.color;});
var shapesall = $.map(this.cards2, function(el) { return el.shape; });
var fillsall= $.map(this.cards2,function(el) { return el.fill; });
var numbersall = $.map(this.cards2, function(el) { return el.number;});
var a = 0;
for (a =0; a < this.cards2.length; a++) {
return shapes === shapesall[a] && colors === colorsall[a] && fills === fillsall[a] && numbers === numbersall[a];
}
},
*/
@ -2310,12 +2327,12 @@ var Game = {
generateVirtualCard34: function(cards1, cards2){
var colors2= $.map(cards1, function(el) { return $(el).data("color");});
var shapes2 = $.map(cards1, function(el) { return $(el).data("shape");});
var fills2 = $.map(cards1, function(el) { return $(el).data("fills");});
var fills2 = $.map(cards1, function(el) { return $(el).data("fill");});
var numbers2 = $.map(cards1, function(el) { return $(el).data("number");});
var colors3= $.map(cards2, function(el) { return $(el).data("color");});
var shapes3 = $.map(cards2, function(el) { return $(el).data("shape");});
var fills3 = $.map(cards2, function(el) { return $(el).data("fills");});
var fills3 = $.map(cards2, function(el) { return $(el).data("fill");});
var numbers3 = $.map(cards2, function(el) { return $(el).data("number");});
if(colors2[0] === colors2 [1]){
@ -2583,13 +2600,13 @@ var Game = {
// modalité des combinaison de carte (ab ac ad ...) pour verifier si forme un set
var colors2= $.map(cards1, function(el) { return $(el).data("color");});
var shapes2 = $.map(cards1, function(el) { return $(el).data("shape");});
var fills2 = $.map(cards1, function(el) { return $(el).data("fills");});
var fills2 = $.map(cards1, function(el) { return $(el).data("fill");});
var borders2 = $.map(cards1, function(el) { return $(el).data("border");});
var numbers2 = $.map(cards1, function(el) { return $(el).data("number");});
var colors3= $.map(cards2, function(el) { return $(el).data("color");});
var shapes3 = $.map(cards2, function(el) { return $(el).data("shape");});
var fills3 = $.map(cards2, function(el) { return $(el).data("fills");});
var fills3 = $.map(cards2, function(el) { return $(el).data("fill");});
var borders3 = $.map(cards2, function(el) { return $(el).data("border");});
var numbers3 = $.map(cards2, function(el) { return $(el).data("number");});
@ -2775,12 +2792,12 @@ var Game = {
var colors2= $.map(cards1, function(el) { return $(el).data("color");});
var shapes2 = $.map(cards1, function(el) { return $(el).data("shape");});
var fills2 = $.map(cards1, function(el) { return $(el).data("fills");});
var fills2 = $.map(cards1, function(el) { return $(el).data("fill");});
var numbers2 = $.map(cards1, function(el) { return $(el).data("number");});
var colors3= $.map(cards2, function(el) { return $(el).data("color");});
var shapes3 = $.map(cards2, function(el) { return $(el).data("shape");});
var fills3 = $.map(cards2, function(el) { return $(el).data("fills");});
var fills3 = $.map(cards2, function(el) { return $(el).data("fill");});
var numbers3 = $.map(cards2, function(el) { return $(el).data("number");});
if (colors2[0] === colors2[1] && colors2[0] === colors2[2]) {
@ -3806,7 +3823,7 @@ var Game = {
if (!data.gameComplete) {
self.set0 = 0;
//self.updateCards(data);
//self.existingSet0();
self.existingSet0();
self.increaseScore0();
} else {
self.gameWon();
@ -3865,7 +3882,7 @@ var Game = {
if (!data.gameComplete) {
self.set1 = 0;
//self.updateCards1(data);
//self.existingSet1();
self.existingSet1();
self.increaseScore1();
} else {
self.gameWon();
@ -3896,7 +3913,7 @@ var Game = {
if (!data.gameComplete) {
//self.updateCards2(data);
//self.existingSet2();
self.existingSet2();
self.increaseScore2();
} else {
self.gameWon();

Loading…
Cancel
Save