From c8a3f1b40e7cd390c0f242fb915bfa3a9a3a2837 Mon Sep 17 00:00:00 2001 From: Dorus Date: Tue, 2 Dec 2014 22:02:32 +0100 Subject: [PATCH] Cannot join during idle. --- src/werewolf/Werewolf.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/werewolf/Werewolf.java b/src/werewolf/Werewolf.java index 72a4aa9..8f1f9ee 100644 --- a/src/werewolf/Werewolf.java +++ b/src/werewolf/Werewolf.java @@ -533,7 +533,10 @@ private void sendNotice(int sender, String notice2) { } private void joinGame(String sender) { - if (status != GameStatus.PRE && status != GameStatus.IDLE) { + if (status == GameStatus.IDLE) { + return; + } + if (status != GameStatus.PRE) { // if the game is already running, dont add anyone else to either list sendNotice(sender, "The game is currently underway. Please wait for " + "the current game to finish before trying again.");