I want to create a board game (at least it's structure and engine, not the graphics), and since It's the first time I do this I don't know where to start.
It's a turn based strategy card game where cards that act differently, some are placed and moved on the board, some are placed but don't move, and some are played from the hand but not placed on the board.
Well, I don't know how to translate this to code. I thought that I should have a interface for the Cards, but since there are various types of cards that act very differently it doesn't make sense . Then I thought that there should be a class for each Player which stores which of his cards are played, which are left etc.. Something like this:
public Class Player { private List<Card> PlayableCards; private List<Card> OutOfGameCards; } But there's a fixed amount of cards of each type, so its useless to have a List<T> (besides as I said I don't think I'll have a Card class). Then How should I approach this? Having the cards as individual variables? It doesn't sound right.
The next thing is the Board, it's formed by 8x8 squares where the cards are placed. How do I identify each placed card with a card in the code?
Maybe something like this:
public Class GameBoard { private Square[][] SquareGrid; } If I do it this way its easy to separate each square and access it by it's position (SquareGrid[3][4]=3x4). But do I store which card is in each Square? Or do I store in which square is each card? After that there's a "special zone" outside this board and everything gets more messy.