doEntityMovement(packet, connId); endCurrentTurn();
receiveMovement(packet, connId);
    synchronized void handle(int connId, Packet packet) {        //System.out.println("s(" + cn + "): received command");        if (packet == null) {            System.out.println("server.connection.handle: got null packet");            return;        }        // act on it        switch(packet.getCommand()) {            case Packet.COMMAND_CLIENT_NAME :                receivePlayerName(packet, connId);                break;            case Packet.COMMAND_PLAYER_UPDATE :                receivePlayerInfo(packet, connId);                validatePlayerInfo(connId);                send(createPlayerUpdatePacket(connId));                break;            case Packet.COMMAND_PLAYER_READY :                receivePlayerDone(packet, connId);                send(createPlayerDonePacket(connId));                checkReady();                break;            case Packet.COMMAND_CHAT :                String chat = (String)packet.getObject(0);                if (chat.startsWith("/")) {                    processCommand(connId, chat);                } else {                    sendChat(getPlayer(connId).getName(), chat);                }                break;            case Packet.COMMAND_ENTITY_MOVE :                doEntityMovement(packet, connId);                endCurrentTurn();                break;            case Packet.COMMAND_ENTITY_DEPLOY :                receiveDeployment(packet);                endCurrentTurn();                break;            case Packet.COMMAND_ENTITY_ATTACK :                receiveAttack(packet);                endCurrentTurn();                break;            case Packet.COMMAND_ENTITY_ADD :                receiveEntityAdd(packet, connId);                resetPlayersDone();                transmitAllPlayerDones();                break;            case Packet.COMMAND_ENTITY_UPDATE :                receiveEntityUpdate(packet, connId);                resetPlayersDone();                transmitAllPlayerDones();                break;            case Packet.COMMAND_ENTITY_MODECHANGE :                receiveEntityModeChange(packet, connId);                break;            case Packet.COMMAND_ENTITY_REMOVE :                receiveEntityDelete(packet, connId);                resetPlayersDone();                transmitAllPlayerDones();                break;            case Packet.COMMAND_SENDING_GAME_SETTINGS :                if (receiveGameOptions(packet, connId)) {                    resetPlayersDone();                    transmitAllPlayerDones();                    send(createGameSettingsPacket());                }                break;            case Packet.COMMAND_SENDING_MAP_SETTINGS :                mapSettings = (MapSettings)packet.getObject(0);                mapSettings.replaceBoardWithRandom(MapSettings.BOARD_RANDOM);                resetPlayersDone();                transmitAllPlayerDones();                send(createMapSettingsPacket());                break;            case Packet.COMMAND_QUERY_MAP_SETTINGS :                MapSettings temp = (MapSettings)packet.getObject(0);                temp.setBoardsAvailableVector(scanForBoards(temp.getBoardWidth(), temp.getBoardHeight()));                temp.removeUnavailable();                temp.setNullBoards(DEFAULT_BOARD);                temp.replaceBoardWithRandom(MapSettings.BOARD_RANDOM);                temp.removeUnavailable();                send(connId, createMapQueryPacket(temp));                break;        }    }