How to make a card deck?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Gator Von

Now im having a project about a card based game, and i got one thing that still confuses me.

How to make a proper card deck where you can choose your cards you want to use to the match and can be used (i.e you had choose card A therefore card A will be visible and be useable in the match)

Please answer this, im sorry if my question is not understandable

:bust_in_silhouette: Reply From: N00b

I dont really get what you mean by Deck.

Deck as the pile of cards you can draw in a game?
or Deck as the whole collection of cards you managed to get?

anyway, both are the same answers. u need to create an array of the cards.

example:

const ALL_GAME_CARDS = [card1, card2, card3,]
var myCollection = [card1, card3]

OR:

var myCollection = [card1, card2]
var inGameDeck = [card1, card2]
var gameHand = [card1]

gameHand.append(inGameDeck[1]) #this would add "card2" to your game hand

I dont know if i could help, either i am an expert.
But this is how i would do it