From 5ece8b8f27b3436f286ea2377be647a4b81e3c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bokros=20B=C3=A1lint?= Date: Tue, 29 Mar 2016 11:52:19 +0200 Subject: [PATCH] Stargate isn't initialized with nullpointers now --- cicaprojekt/Stargate.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cicaprojekt/Stargate.java b/cicaprojekt/Stargate.java index 2fdbc25..81051d3 100644 --- a/cicaprojekt/Stargate.java +++ b/cicaprojekt/Stargate.java @@ -6,13 +6,15 @@ public class Stargate { public static final Stargate yellowStargate = new Stargate(); public static final Stargate blueStargate = new Stargate(); - public final Stargate other = null; /*null, hogy ne sírjon*/ + public /*final*/ Stargate other; //TODO find better ways to do this private cicaprojekt.Wall currentWall; public static void init() { Menu.addTab(); System.out.println(">" + "[" + ":" + "Stargate" + "]" + Menu.tabulator + "Stargate.init()"); + yellowStargate.other = blueStargate; + blueStargate.other = yellowStargate; System.out.println("<" + "[" + ":" + "Stargate" + "]" + Menu.tabulator + "Stargate.init()"); Menu.removeTab(); }