Original Post
Hi! I am makking a multiplayer game, but I came up with following problem. I have read about 4 books and browsed hundreds of web pages about design patterns last week. They all explain types of design patterns very detailed, but none of them show a real-world usage. My problem is that i have three classes: Application, Network and UserManager. Application has exactly one instance of Network and one of UserManager. When a client connects to the server Network creates a user instance in UserManager. Then UserManager uses Network to send a message to all other clients, that a user has been created. So the realtionship of both is: UserManager <-> Network. I can't imagine which pattern to use, because I need many instances of Application (can't use singleton) and as stated in many web sites: dependency injection is evil. I use ActionScript for client and C++ for server (both of them must use the same pattern and code should look the same). Thanks in advance!