0 votes

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

asked Nov 19, 2019 in Engine by Gator Von (15 points)

1 Answer

0 votes
Best answer

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.


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


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

answered Nov 19, 2019 by N00b (68 points)
selected Nov 19, 2019 by Gator Von
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.