Les tests remarchent
continuous-integration/drone/push Build is passing Details

pull/66/head
Raphael LACOTE 2 years ago
parent 6a564d3f60
commit 66498cf227

@ -152,33 +152,33 @@ function trouveElements(attributsCartes) {
let x;
tabColor.forEach(element => {
TAB_COLOR.forEach(element => {
if (element == attributsCartes[0]) {
x = createElements(attributsCartes, tabColor);
x = createElements(attributsCartes, TAB_COLOR);
}
});
tabNumber.forEach(element => {
TAB_NUMBER.forEach(element => {
if (element == attributsCartes[0]) {
x = createElements(attributsCartes, tabNumber);
x = createElements(attributsCartes, TAB_NUMBER);
}
});
tabShape.forEach(element => {
TAB_SHAPE.forEach(element => {
if (element == attributsCartes[0]) {
x = createElements(attributsCartes, tabShape);
x = createElements(attributsCartes, TAB_SHAPE);
}
});
tabFilling.forEach(element => {
TAB_FILLING.forEach(element => {
if (element == attributsCartes[0]) {
x = createElements(attributsCartes, tabFilling);
x = createElements(attributsCartes, TAB_FILLING);
}
});
tabOutline.forEach(element => {
TAB_OUTLINE.forEach(element => {
if (element == attributsCartes[0]) {
x = createElements(attributsCartes, tabOutline);
x = createElements(attributsCartes, TAB_OUTLINE);
}
});
@ -191,6 +191,7 @@ function createCard(cards) {
let carteFinale = [];
let listeInter = [];
cards.forEach(element => {
attributesMatrix.push(element.getAttributes());
});
@ -201,6 +202,7 @@ function createCard(cards) {
listeInter.push(element[i]);
});
//S'ils sont tous égaux
if (listeInter.every(element => element === listeInter[0])) {
l = []
@ -218,8 +220,6 @@ function createCard(cards) {
}
}
}
console.log(carteFinale);
return carteFinale;
}

@ -1,8 +1,8 @@
let card1 = new Card({'color':'red', 'number':3, 'shape':'wave','filling':'full'});
let card1 = new Card({ 'color': 'red', 'number': 3, 'shape':'squiggle','filling':'full'});
let card2 = new Card({'color':'red', 'number':3, 'shape':'oval','filling':'empty'});
let card3 = new Card({'color':'blue', 'number':2, 'shape':'oval', 'fillin':'full'});
let card4 = new Card({'color':'green', 'number':1, 'shape':'wave', 'fillin':'pointed'});
let card5 = new Card({'color':'green', 'number':1, 'shape':'wave', 'fillin':'full'});
let card4 = new Card({ 'color': 'green', 'number': 1, 'shape':'squiggle', 'fillin':'pointed'});
let card5 = new Card({ 'color': 'green', 'number': 1, 'shape':'squiggle', 'fillin':'full'});
deckA = [];
deckB = [];
deckC = [];
@ -14,16 +14,16 @@ deckC.push(card3, card5);
console.assert(isHyperset(deckA, deckB) == true);
console.assert(isHyperset(deckA, deckC) == false);
let BcardG1 = new Card({'color':'red', 'number':4, 'shape':'wave','filling':'empty','outline':'continuous'});
let BcardG2 = new Card({'color':'red', 'number':3, 'shape':'wave','filling':'full','outline':'continuous'});
let BcardG3 = new Card({'color':'red', 'number':2, 'shape':'wave','filling':'squared','outline':'continuous'});
let BcardG4 = new Card({'color':'red', 'number':1, 'shape':'wave','filling':'pointed','outline':'continuous'});
let BcardG1 = new Card({ 'color': 'red', 'number': 4, 'shape':'diamond','filling':'empty','outline':'continuous'});
let BcardG2 = new Card({ 'color': 'red', 'number': 3, 'shape':'squiggle','filling':'full','outline':'continuous'});
let BcardG3 = new Card({ 'color': 'red', 'number': 2, 'shape':'star','filling':'squared','outline':'continuous'});
let BcardG4 = new Card({ 'color': 'red', 'number': 1, 'shape':'triangle','filling':'pointed','outline':'continuous'});
let BcardD1 = new Card({'color':'green', 'number':3, 'shape':'oval','filling':'pointed','outline':'cloudy'});
let BcardD2 = new Card({'color':'blue', 'number':2, 'shape':'oval','filling':'squared','outline':'sharpy'});
let BcardD3 = new Card({'color':'purple', 'number':4, 'shape':'oval','filling':'full','outline':'hyphen'});
let BcardD4 = new Card({'color':'orange', 'number':1, 'shape':'oval','filling':'empty','outline':'dotted'});
let BcardD5 = new Card({'color':'purple', 'number':4, 'shape':'oval','filling':'stripped','outline':'hyphen'});
let BcardD1 = new Card({'color':'green', 'number':3, 'shape':'oval','filling':'pointed','outline':'dot'});
let BcardD2 = new Card({'color':'blue', 'number':2, 'shape':'oval','filling':'squared','outline':'rect'});
let BcardD3 = new Card({'color':'purple', 'number':4, 'shape':'oval','filling':'full','outline':'spade'});
let BcardD4 = new Card({'color':'orange', 'number':1, 'shape':'oval','filling':'empty','outline':'sharp'});
let BcardD5 = new Card({'color':'purple', 'number':4, 'shape':'oval','filling':'stripped','outline':'spade'});
BdeckA = [];

Loading…
Cancel
Save