I just started my Java class, and our preliminary unit is just us messing with Karel J. Robot. Our final project on it is to use ingenuity to do something awesome with it, like make a game out of it. I'm working on a game where you control a robot. It is to my understanding that to control the robot with the standard WADS scheme, you need to use scanners. However, every time you press a key, you have to hit enter after it so the program registers the keystroke. Does anyone know how I can make it so I don't have to press enter after pressing a key to make the program know I pressed the key?
I only know how to do that in GUI, aka Swing, but not how on a command line D: Other than that I'm pretty much a Java guru.
Simply make a JFrame, and add a Key listener to it. Then, in the keydown event, just check if it is WASD and do your correct action. Maybe System.in will work too?