refactor: re-formated LobbyConnection

This commit is contained in:
Yannik Bretschneider 2021-06-08 02:28:58 +02:00
parent 07ce02b937
commit 80ad60a658
1 changed files with 20 additions and 18 deletions

View File

@ -113,7 +113,9 @@ public class LobbyConnection implements Runnable {
return player2;
}
public HashSet<Participant> getSpectators() {return spectators;}
public HashSet<Participant> getSpectators() {
return spectators;
}
public boolean hasPlayer1() {
return player1 != null;
@ -127,8 +129,7 @@ public class LobbyConnection implements Runnable {
public void handleMessage(Participant participant, Request[] requests) {
try {
this.requestQueue.put(Tuple.of(participant, requests));
}catch (InterruptedException e) {
} catch (InterruptedException ignored) {
}
}
@ -231,7 +232,8 @@ public class LobbyConnection implements Runnable {
Tuple<Participant, Request[]> current = null;
try {
current = requestQueue.poll(1000, TimeUnit.MILLISECONDS);
} catch (InterruptedException ignored) {}
} catch (InterruptedException ignored) {
}
return current;
}