Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

Show that (p q) (q r) (p r) is a tautology.

Answered: 1 week ago

Question

The amount of work I am asked to do is reasonable.

Answered: 1 week ago

Question

The company encourages a balance between work and personal life.

Answered: 1 week ago