Klassenvariable "spiel" durch anonyme Klasse ersetzt

This commit is contained in:
Marc Koch 2020-04-27 13:12:47 +02:00
parent c81536f941
commit cd12f97073
Signed by: marc
GPG Key ID: AC2D4E00990A6767
1 changed files with 1 additions and 4 deletions

View File

@ -8,7 +8,6 @@ import java.io.IOException;
public class TicTacToe {
static Fenster f;
static Spiel spiel;
static boolean DEBUG = true;
public static void main(String[] args) throws IOException {
@ -25,13 +24,11 @@ public class TicTacToe {
while (nochEinSpiel) {
f.newSpielfeld();
spiel = new Spiel(f);
nochEinSpiel = spiel.spielen();
nochEinSpiel = new Spiel(f).spielen();
// aufräumen
Gewinner.setSpieler(null);
Zug.setZugNummer(0);
spiel = null;
}
} catch (InterruptedException ie) {
System.err.println("Da ist was schief gelaufen!");