From cd12f9707355e6d3bf8548c97121233fde58cda4 Mon Sep 17 00:00:00 2001 From: Marc Michalsky Date: Mon, 27 Apr 2020 13:12:47 +0200 Subject: [PATCH] Klassenvariable "spiel" durch anonyme Klasse ersetzt --- src/gfn/marc/TicTacToe.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gfn/marc/TicTacToe.java b/src/gfn/marc/TicTacToe.java index 0bacaf5..2ea3492 100644 --- a/src/gfn/marc/TicTacToe.java +++ b/src/gfn/marc/TicTacToe.java @@ -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!");