|
|
|
@ -31,30 +31,29 @@ console.groupEnd();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.group('Deck');
|
|
|
|
|
let deck = new Deck([0,1,2,3]);
|
|
|
|
|
let deck = new Deck([0,1,3,4]);
|
|
|
|
|
console.log(`All cards with 4 attributes size ${deck.allCards.length}`);
|
|
|
|
|
console.log(`size output ${deck.outputCards.length}`);
|
|
|
|
|
//Display all cards
|
|
|
|
|
console.log(`All cards`);
|
|
|
|
|
console.log(deck.allCards)
|
|
|
|
|
deck.allCards.forEach(e => {
|
|
|
|
|
console.log(e.color,e.number,e.shape,e.filling);
|
|
|
|
|
//console.log(e.color,e.number,e.shape,e.filling);
|
|
|
|
|
console.log(e.color,e.number,e.filling,e.outline);
|
|
|
|
|
//console.log(e.color,e.number,e.shape,e.outline);
|
|
|
|
|
});
|
|
|
|
|
console.log(`Output cards`);
|
|
|
|
|
// deck.outputCards.forEach(e => {
|
|
|
|
|
// console.log(e.getAttributes());
|
|
|
|
|
// });
|
|
|
|
|
console.log(`set already made ${deck.setMade}`);
|
|
|
|
|
|
|
|
|
|
console.log(`remaining cards:`);
|
|
|
|
|
deck.setMade.forEach(e => {
|
|
|
|
|
console.log(e.color,e.number,e.shape,e.filling);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let customCard=[new Card('red',1,'diamond','stripped')];
|
|
|
|
|
//deck.checkSet(customCard);
|
|
|
|
|
console.log(`deck size :${deck.allCards.length}`);
|
|
|
|
|
|
|
|
|
|
console.log(`remaining cars:`);
|
|
|
|
|
deck.setMade.forEach(e => {
|
|
|
|
|
console.log(e.color,e.number,e.shape,e.filling);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
//let deck5 = new Deck([0,1,2,3,4]);
|
|
|
|
|
//console.log(`All cards with 5 attributes size ${deck5.allCards.length}`);
|
|
|
|
|