public synchronized void addLobby(GameSettings gs, ClientThread ct) {
        
        Packet answer = null;
        
        if(gs == null || ct == null) {
            answer = Packet.getServerErrorPacket();
        } else {        
            lastID++;       
            Lobby l = new Lobby(lastID, gs, this);
            lobbies.put(lastID, l);        
            l.addPlayer(ct);
            
            ct.gameID = new Integer(lastID);
            answer = new Packet(Packet.PACKET_CODES.GAME_CREATED_CODE);
            answer.setData(ct.gameID);
        }
        
        try {
            ct.sendToClient(answer);
        } catch(Exception e) {}
    }