Hello Gamedev! I'm here because my google-fu has been exhausted; any help is appreciated.
tl;dr - How should I go about representing a 2 Dimensional grid-based battlefield, given that it has to hold a number of card objects and also its be able to represent its own state? What is the best way to implement a deck of card objects?
I'm currently working on a Card/Battlefield game, where you summon creatures, items, and spells using cards from a deck you build.
I'm having a bit of trouble, conceptually, on how best to represent the various states and positions of each card object in the deck and on the field.
Currently, I'm using a linkedlist of cards for the deck and hand, and a 2-D array of cards for the battlefield grid. It's pretty simple, and lets me do what I want with moving cards around and restricting their placements, but it feels clumsy and basic.
It also makes it difficult to implement things like Fog of War; I'd have to make a battlefield tile object and populate the array with them instead of cards, and there's a lot of space for things to go wrong for someone of my skill in that sort of case - though of course, it does work, and it does what I want - I'm just not confident I understand the languages I use well enough to catch all the issues with it, and there aren't many non-web places I can ask for help.
Thanks you for reading, and thanks for your time.