class CGame
{
private:
CPlayer* Player;
// Reset of code
}
class CPlayer
{
private:
// Rest of code
}
int main(void)
{
// Create Game
CGame* game = game -> fnCreateGame();
return 0;
}
please ignore the syntax error's, i not doing it for the code corrects.
I want to kind of use the Game class to control other class's, but no idea to do it and to create the class's without crashing.
I create an object of Engine in main(), creating objects of the Shapes and board classes. Then call Engine.run(), creating a GUI object.
Everything is handled by either run() or update() within the Engine class, but each class could have an object created in main() and tested etc.
Any new'ed stuff is then deleted in the ~Engine destructor.
Edit:
This is what it does( So far ). And the Engine class handles all other classes.
Each class in-turn handles what it does. http://www.youtube.com/watch?v=sNR8HejYJ6s