Fix errors
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import pp.mdga.client.view.GameView;
|
||||
import pp.mdga.client.view.LobbyView;
|
||||
import pp.mdga.notification.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
import com.jme3.network.serializing.Serializer;
|
||||
import pp.mdga.game.Game;
|
||||
import pp.mdga.game.Player;
|
||||
import pp.mdga.message.client.*;
|
||||
import pp.mdga.message.client.ClientMessage;
|
||||
import pp.mdga.message.server.*;
|
||||
import pp.mdga.message.server.ServerMessage;
|
||||
import pp.mdga.server.ServerGameLogic;
|
||||
import pp.mdga.server.ServerSender;
|
||||
|
||||
@@ -53,7 +57,7 @@ public static void main(String[] args) {
|
||||
*/
|
||||
public MdgaServer() {
|
||||
LOGGER.log(Level.INFO, "Creating MdgaServer"); //NON-NLS
|
||||
logic = new ServerGameLogic(new Game(), this);
|
||||
logic = null;//new ServerGameLogic(new Game(), this);
|
||||
}
|
||||
|
||||
public void run() {
|
||||
@@ -166,13 +170,13 @@ public void messageReceived(HostedConnection source, Message message) {
|
||||
@Override
|
||||
public void connectionAdded(Server server, HostedConnection hostedConnection) {
|
||||
LOGGER.log(Level.INFO, "new connection {0}", hostedConnection); //NON-NLS
|
||||
logic.addPlayer(hostedConnection.getId());
|
||||
//logic.addPlayer(hostedConnection.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void connectionRemoved(Server server, HostedConnection hostedConnection) {
|
||||
LOGGER.log(Level.INFO, "connection closed: {0}", hostedConnection); //NON-NLS
|
||||
final Player player = logic.getPlayerById(hostedConnection.getId());
|
||||
final Player player = null;// = logic.getPlayerById(hostedConnection.getId());
|
||||
if (player == null)
|
||||
LOGGER.log(Level.INFO, "closed connection does not belong to an active player"); //NON-NLS
|
||||
else { //NON-NLS
|
||||
|
||||
Reference in New Issue
Block a user