class Deck{ /** * * @param {*} attributes : array with the attributes index for the cards * @author Bastien Jacquelin */ constructor(attributes,nbCards){ //console.log(attributes); this.allCards=this.createCards(attributes);// All the cards in the game this.remainingCards=[] this.nbCards=nbCards; this.remainingCards=this.remainingCards.concat(this.allCards);// cards in the stack 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); } /** * @brief creation of the deck : 12 cards lay in front of the player * @author Bastien Jacquelin */ createDeck(nbCards){ if(this.remainingCards.length==0){ console.log("PLUS DE CARTES"); return; } else{ for (let i=0; i { for(let i=0; i