Question: I am trying to create a java game with two tracks, where the track is chosen in the first step. My problem is, that I

I am trying to create a java game with two tracks, where the track is chosen in the first step. My problem is, that I would like to call the class crash1 for track 1, and crash2 for track 2. Is should run in a whileloop along with Keys, so it checks if position is out of bound by each move. Is it possible to separate them automatically, when clicking the button?

I tried applying a while-loop within the ActionEvent, but then the track doesn't appear.

I am trying to create a java game with two tracks, wherethe track is chosen in the first step. My problem is, that

public static void main(String[] args) throws InterruptedException int n = 40; posLX) = (int)(n/2.0); // Implements initial criteria oldPos = pos.clone(); distance[0] = 0; distance[1] = 0; menu) Thread.sleep(5000); while (true) Keys); Crash10 public static void main(String[] args) throws InterruptedException int n = 40; posLX) = (int)(n/2.0); // Implements initial criteria oldPos = pos.clone(); distance[0] = 0; distance[1] = 0; menu) Thread.sleep(5000); while (true) Keys); Crash10

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!