Original Post
Hello, I am Norgar, I'm from Spain and I will try to speak English the best that I can, sorry if my messages are confused. Hope that you can help me. I am writing a game, just for entertainment. The client connects to the server and they exchange data, like many games. I just have a log in menu that ask for user and password, and when you login, you see a list of characters and you choose one of the list. By now, all works perfectly, you can log-in in the system with your account and password and you see your own list of characters, you can create a new character too if you want. I use SDL and C++ (I think that this doesn't matter) and OOP. In the client, I have a class for the Graphics (Draws and set up SDL video), Map (Manage the map, but I don't use it yet), Player (Manage the HP and MP, I don't use it yet), Packet (Stores data sent by the server and data to send), Tiles (Stores images for the map), and the question, Interface and Network. The class Interface stores input boxes, buttons, etc, reads the keyboard and mouse to see if the user clicked in a button o wrote in a input box, reads the packets sent by the server to change the appearance of the interface and also stores the functions of each button, so when the user clicks on a button, the class executes those functions. The class Network just send and receive Packets, this class doesn't execute and do nothing. The problem it's that I think that Interface class does functions in my code that should not, but I don't know how to solve it. I know that I said that my code works perfectly but I think that I must to construct the code to avoid future problems and bugs. I thought to wrote another class to manage all the other classes in it, something like a "core" to manage all. What do you think? I should to leave everything as is? Or I must change the code? A big thread for a little "problem"...