fix: updated timeout-method for spectator-error

This commit is contained in:
Richard Reiber 2021-06-06 00:49:09 +02:00
parent 6a8de34c67
commit c1cd3fba66
1 changed files with 2 additions and 2 deletions

View File

@ -147,10 +147,10 @@ public class Lobby {
new EventBuilder(EventType.TimeoutEvent).buildGameStateEvent());
connection.removeParticipant(source);
if(connection.hasPlayer1()){
if(connection.hasPlayer1() && !connection.hasPlayer2()){
generateWin(connection.getPlayer1());
}
else if(connection.hasPlayer2()) {
else if(!connection.hasPlayer1() && connection.hasPlayer2()) {
generateWin(connection.getPlayer2());
}
else {