Hallo. Ich versuche auf Java ein Spiel zu programmieren und meine Schleife hört einfach nicht auf zu laufen also das Spiel hängt sich quasi auf und macht nichts mehr, ihr wisst was ich meine :D
Wäre super lieb wenn mir jemand helfen könnte.

Hier ist mein Code:

boolean nochmal;

   nochmal = true;

   if (läuft) {

     while (nochmal) {

       if (tf_frage.getText().equals("14*6") && tf_eingabe.getText().equals("84")) {

         tf_eingabe.setBackground(Color.green);

         nochmal = false;

         JOptionPane.showMessageDialog(null, "Ergebnis", "Ihre Antwort war richtig!", JOptionPane.INFORMATION_MESSAGE);

       } // end of if

       else if (tf_frage.getText().equals("13*8") && tf_eingabe.getText().equals("104")){

         tf_eingabe.setBackground(Color.green);

         nochmal = false;

         JOptionPane.showMessageDialog(null, "Ergebnis", "Ihre Antwort war richtig!", JOptionPane.INFORMATION_MESSAGE);

       } // end of if-else

       else if(tf_frage.getText().equals("11*12") && tf_eingabe.getText().equals("132")) {

         tf_eingabe.setBackground(Color.green);

         nochmal = false;

         JOptionPane.showMessageDialog(null, "Ergebnis", "Ihre Antwort war richtig!", JOptionPane.INFORMATION_MESSAGE);

       } // end of if-else

       else if (tf_frage.getText().equals("19*4") && tf_eingabe.getText().equals("76")) {

         tf_eingabe.setBackground(Color.green);

         nochmal = false;

         JOptionPane.showMessageDialog(null, "Ergebnis", "Ihre Antwort war richtig!", JOptionPane.INFORMATION_MESSAGE);

       } // end of if-else

       else if (tf_frage.getText().equals("9*16") && tf_eingabe.getText().equals("144")){

         tf_eingabe.setBackground(Color.green);

         nochmal = false;

         JOptionPane.showMessageDialog(null, "Ergebnis", "Ihre Antwort war richtig!", JOptionPane.INFORMATION_MESSAGE);

       } // end of if-else

       else if (tf_frage.getText().equals("12*17") && tf_eingabe.getText().equals("204")) {

         tf_eingabe.setBackground(Color.green);

         nochmal = false;

         JOptionPane.showMessageDialog(null, "Ergebnis", "Ihre Antwort war richtig!", JOptionPane.INFORMATION_MESSAGE);

       } // end of if-else

       else if (tf_frage.getText().equals("16*7") && tf_eingabe.getText().equals("112")) {

         tf_eingabe.setBackground(Color.green);

         nochmal = false;

         JOptionPane.showMessageDialog(null, "Ergebnis", "Ihre Antwort war richtig!", JOptionPane.INFORMATION_MESSAGE);

       } // end of if-else

       else {

         tf_eingabe.setBackground(Color.red);

       } // end of if-else

     } // end of while

   } // end of if