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?