From 9bb2f9a490e60bee79e53b11926d2d3293fb45cb Mon Sep 17 00:00:00 2001 From: bajacqueli Date: Mon, 6 Mar 2023 20:29:19 +0100 Subject: [PATCH] factory create good cards, good index on dico --- src/Model/Deck.js | 1 - src/Model/Factory.js | 39 ++++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/Model/Deck.js b/src/Model/Deck.js index f3df37c..ce0cf47 100644 --- a/src/Model/Deck.js +++ b/src/Model/Deck.js @@ -12,7 +12,6 @@ class Deck{ this.outputCards=[];// 12 cards lay on the table this.setMade=[];// array of array with all the set already mades (array of set) this.createDeck(12); - console.log("nbCards",this.nbCards); // console.log("allCards after deck",this.allCards); console.log("remainingCards after deck",this.remainingCards); console.log("outputCards",this.outputCards); diff --git a/src/Model/Factory.js b/src/Model/Factory.js index 04eb768..2bb9061 100644 --- a/src/Model/Factory.js +++ b/src/Model/Factory.js @@ -2,11 +2,11 @@ class Factory{ constructor(arrayOfAttributes, nbAttributes){ this.nbAttr=nbAttributes; this.dicoAttributes=this.attributesDictionnary(arrayOfAttributes,this.funArrayOfAttributes(arrayOfAttributes)); - this.product=this.concreteCardCreation(arrayOfAttributes); + this.product=this.concreteCardCreation(arrayOfAttributes); // console.log("arrayOfAttributes",this.funArrayOfAttributes(arrayOfAttributes)); - // console.log("attributesDictionnary",this.dicoAttributes) - // console.log("attributesName",this.attributesName(this.dicoAttributes)); - // console.log("allCards",this.product); + console.log("attributesDictionnary",this.dicoAttributes) + console.log("attributesName",this.attributesName(this.dicoAttributes)); + console.log("allCards",this.product); } /** @@ -84,10 +84,10 @@ class Factory{ for (let c=0; c