I am making an application for a card game, with a standard 52-deck playing card. For now, I am writing a solitaire game with for learning purposes. I've had some experience making platformers and arcade games, but none with card and turn-based games.I am trying to implement some sort of MVC pattern, separating the game logic from the actual GUI. I intend to have a drag-and-drop interface for cards, but I don't know where to handle the card's position. I have a Card class that contains the rank and the suit, and other card-related methods. Should the Card class handle it's own position? Wouldn't that mean that my model is not decoupled properly? If the View should handle the card's position, wouldn't that create excessive objects and references? Any idea and argument is greatly appreciated.
Java card game design decision
java
Add a Table class that holds several Stacks.Then each Stack is a list of cards where you can take the top one off and put a card on given some constraints.Moving a card will then be (destination and source are Stacks):if(destination.canPut(source.top())){    destination.put(source.take());}The view will know where and how to render each Stack and what the cards look like etc. Then end result is that Card is just a dumb immutable object that is contained in a Stack.Each stack can have different constraints using polymorphism, for example the pot cannot take any cards, the result can only take cards of the same suit and 1 higher and so on.