private static String packGamesListPacket(Packet packet) {
        StringBuilder res = new StringBuilder();
        
        @SuppressWarnings("unchecked")
        ArrayList<GameLobby> data = (ArrayList<GameLobby>) packet.getData();
                
        res.append("\n");
        
        for(int i = 0; i < data.size(); i++) {
            GameLobby gl = data.get(i);

            res.append(Packet.PACKET_CODES.GAME_ID + " " + gl.ID + "\n");
            res.append(Packet.PACKET_CODES.GAME_PLAYER_MAX + " " + gl.settings.maxCountOfPlayer + "\n");
            res.append(Packet.PACKET_CODES.GAME_PLAYER_CURRECT + " " + gl.currentCountOfPlayer + "\n");
            res.append(Packet.PACKET_CODES.GAME_AREA_SIZE + " " + gl.settings.XSize + " " + gl.settings.YSize + "\n");
            res.append(Packet.PACKET_CODES.GAME_TURN_TIMEOUT + " " + gl.settings.turnTime + "\n");
            res.append(Packet.PACKET_CODES.GAME_EXTRA_TURN + " ");
            if(gl.settings.extraTurn) {
                res.append("1\n");                
            }
            else {
                res.append("0\n");
            }
            res.append(Packet.PACKET_CODES.GAME_USERS_LIST + " ");
            for(int j = 0; j < gl.players.size(); j++) {
                res.append(gl.players.get(j));
                if(j != gl.players.size() - 1) {
                    res.append(" ");
                }
            }
            res.append("\n");            
            
            if(i != data.size() - 1) {
                res.append("\n");
            }
        }
        
        return res.toString();
    }