Klassenvariable "spiel" durch anonyme Klasse ersetzt
This commit is contained in:
parent
c81536f941
commit
cd12f97073
|
|
@ -8,7 +8,6 @@ import java.io.IOException;
|
||||||
public class TicTacToe {
|
public class TicTacToe {
|
||||||
|
|
||||||
static Fenster f;
|
static Fenster f;
|
||||||
static Spiel spiel;
|
|
||||||
static boolean DEBUG = true;
|
static boolean DEBUG = true;
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
|
|
@ -25,13 +24,11 @@ public class TicTacToe {
|
||||||
while (nochEinSpiel) {
|
while (nochEinSpiel) {
|
||||||
|
|
||||||
f.newSpielfeld();
|
f.newSpielfeld();
|
||||||
spiel = new Spiel(f);
|
nochEinSpiel = new Spiel(f).spielen();
|
||||||
nochEinSpiel = spiel.spielen();
|
|
||||||
|
|
||||||
// aufräumen
|
// aufräumen
|
||||||
Gewinner.setSpieler(null);
|
Gewinner.setSpieler(null);
|
||||||
Zug.setZugNummer(0);
|
Zug.setZugNummer(0);
|
||||||
spiel = null;
|
|
||||||
}
|
}
|
||||||
} catch (InterruptedException ie) {
|
} catch (InterruptedException ie) {
|
||||||
System.err.println("Da ist was schief gelaufen!");
|
System.err.println("Da ist was schief gelaufen!");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue