Skip to content

Commit

Permalink
Cannot join during idle.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dorus committed Dec 2, 2014
1 parent 8279905 commit c8a3f1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/werewolf/Werewolf.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
Expand Down

0 comments on commit c8a3f1b

Please sign in to comment.