What's the best way to...
What's the best way to structure KB/M input in a game. I currently have it when the users clicks the X and Y coords are saved in the mouseListener class. Every update the game loop asks the mouseListener class for the X and Y data. the main loop then sends the X and Y data to the GUI/drawing class. I do the same with the keyboard.
I don't know why, but i feel like I'm structuring my game incorrectly. (not the most efficient way) Is this method efficient. If not, what would be more efficient?
Re: What's the best way to...
Take a look at the MVC design (Model-View-Controller). If you search the web most explanations will probably revolve around web application design, but the principle still applies (many swing components use the MVC design). From what you describe it seems your approach is a bit similar. IMO design is relative, there is always more than one solution, and there typically isn't a perfect solution. Long story short, without looking at the full UML layout, I'd guess your design is plenty efficient