merge the new developmentbranch into the test branch #39
@@ -143,23 +143,6 @@ public void received(LobbyNotReadyMessage msg, int from) {
|
||||
this.logic.getServerSender().broadcast(new UpdateReadyMessage(from, false));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be called whenever the server received an LeaveGameMessage message.
|
||||
* It will also get the client id of the player who send this message.
|
||||
*
|
||||
* @param msg as the message which was sent by the player as a LeaveGameMessage object.
|
||||
* @param from as the client id of the player as an Integer.
|
||||
*/
|
||||
@Override
|
||||
public void received(LeaveGameMessage msg, int from) {
|
||||
if (from == this.logic.getGame().getHost()) {
|
||||
this.logic.getServerSender().broadcast(new ShutdownMessage());
|
||||
}
|
||||
this.logic.getGame().removePlayer(from);
|
||||
this.logic.getServerSender().broadcast(new LobbyPlayerLeaveMessage(from));
|
||||
this.logic.getServerSender().disconnectClient(from);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be called whenever the server received a StartGame message.
|
||||
* It will also get the client id of the player who send this message.
|
||||
|
||||
Reference in New Issue
Block a user