From 1b07a94de89a51df753e1cbdb6e0f77d5682ecd0 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 26 Nov 2018 19:46:27 +0100 Subject: Deleted Game.start() content, add check for state change --- src/subconscious/Game.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/subconscious/Game.java b/src/subconscious/Game.java index a7493b3..ed2bea6 100644 --- a/src/subconscious/Game.java +++ b/src/subconscious/Game.java @@ -52,8 +52,7 @@ public class Game { } public void start() { - // TODO: change - this.setState(State.BATTLE); + } public void update(long deltaNanoTime) { @@ -68,6 +67,9 @@ public class Game { /* methods to manage the state */ public void setState(State state) { + if (state == this.state) + return; + // stateLock.lock(); // this.stateChanged.signal(); // stateLock.unlock(); -- cgit v1.2.1