>> CardGame refers to Player and Players refers to CardGame
What excactly do you mean by that. Do you mean that both headers include each other. Then its really a problem.
If you mean Player is used in Game.cpp and Player is used in Game.cpp, thats fine.
I wouldnt use Game either, but for another reason. Game is very ambigious. Do you mean it handles the game-logic, the rules? Then I'd rather use GameLogic. Try to be as specific as you can. Its always good to say in one sentence, what a class is supposed to do. If you cant say it in one sentence, then you need to split it in more classes.
Session sounds good for handling all the objects the game needs and managing the communication between them.
SessionManager, sounds like it is a class that manages multiple sessions. If you mean that then ok, otherwise i would just use Session.
I would add a class like CardDeck, which will handles the visual representation later on, for starters it cound dump the cards in the console.
Main Topics
Browse All Topics





by: epsilon777Posted on 2009-08-26 at 12:38:08ID: 25191387
I reply to myself:
May be putting a third class like a sessionmanager could be a solution:
Game------------Player
|
|
|
SessionManager
The sessionmanager would know the players in the game and the game would interact with the sessionmanager to ask for the next command to execute??
Could it be a nice solution???