Question: I'm trying to implement the game Racecar. I would like to control the java program by numbers 1-9 instead of by clicking the mouse. I

I'm trying to implement the game Racecar. I would like to control the java program by numbers 1-9 instead of by clicking the mouse. I have included the whole program, hope someone can show me how to use keyboard instead of mouse.

I'm trying to implement the game Racecar. I would like to control

the java program by numbers 1-9 instead of by clicking the mouse.

I have included the whole program, hope someone can show me how

to use keyboard instead of mouse. eimport java.util.ArrayList; 2 import java.util.List; 3

import java . util"Scanner; 4 import java.io. 5 import javax.swing.JFrame; Q 6

eimport java.util.ArrayList; 2 import java.util.List; 3 import java . util"Scanner; 4 import java.io. 5 import javax.swing.JFrame; Q 6 import javax,swing, JoptionPane; 8 public class RaceTrack i 10 final static int X-@; // These are used to make the code more readable final static int Y 1; final static int scale 10; // Adjust this value to adjust the size of the course final static int size - 4 scale; / The final size of the field final static int topscore length 10; // Length of the high score list 13 17 18 19 static List IineCoordinates = new ArrayList

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!