Updated 'MdgaServer' class.
Updated the 'MdgaServer' class by saving the host into the 'Game' class.
This commit is contained in:
@@ -199,6 +199,9 @@ private void messageReceived(HostedConnection source, ClientMessage message) {
|
||||
public void connectionAdded(Server server, HostedConnection hostedConnection) {
|
||||
System.out.println("new connection " + hostedConnection); //NON-NLS
|
||||
LOGGER.log(Level.DEBUG, "new connection {0}", hostedConnection); //NON-NLS
|
||||
if (this.myServer.getConnections().size() == 1) {
|
||||
this.logic.getGame().setHost(hostedConnection.getId());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user