Help Ending a game!

I am creating a shooting game that allows the player to shoot at targets. However, I want

my game to be played at least one minute. After one minute has passed I want to end the game

and display performance information such as how many targets were destroyed, the score, and so on. I created

a method called

public void stopGame(){

try {


}catch (Exception e){

System.out.println("Error: " + e.getMessage());



But this method terminates the application, and what I want is to end the game and display performance.

app.stop kills it, like it’s supposed to :wink: you should look into app states instead.

1 Like