- Edited
So, I'm not new to programming, but am new to game development. I seem to not be able to identify a good way to handle a card objects. For example, I have the following two methods in my head.
1) have all cards from both players in a list with a corresponding variable to show ownership, and position on board. These Nodes will be all located under a single node, and they do not move throughout the tree. The reasoning behind this was to ensure I don't potentially "lose" a card.
2) Have each card node under separate nodes representing locations on the board. That way I can query each location to see what cards are there.
My current method of creating said cards, at the beginning of the game, is to have each player enter the game with a list of card ids that represent the cards in their deck. Then have the board g
generate each card and the start the game. The board locations may have to accommodate holding multiple cards like Hearthstone, but will have slots for single cards only
I can see the pros and cons of both, but I'm still not convinced that either method would be scalable. Does anyone have a better solution for this?