public void ProcessConvergePriorAttempt(NetworkResponse response)
    {
        ResponseConvergePriorAttempt args = response as ResponseConvergePriorAttempt;
        ConvergeAttempt attempt           = args.attempt;

        //add new attempt to list if response includes an attempt
        if (attempt.attempt_id == Constants.ID_NOT_SET)
        {
            Debug.LogError("attempt_id not valid in ProcessConvergePriorAttempt");
        }
        else
        {
            attemptList.Add(attempt);
            if (attempt.hint_id != Constants.ID_NOT_SET)
            {
                priorHintIdList.Add(attempt.hint_id);
            }
        }

        //Once all attempts have been processed, finalize.
        if (attemptList.Count == attemptCount)
        {
            FinalizeLoadPriorAttempts();
        }
    }
    public static NetworkResponse Parse(MemoryStream dataStream)
    {
        ResponseConvergePriorAttempt response = new ResponseConvergePriorAttempt();

        using (BinaryReader br = new BinaryReader(dataStream, Encoding.UTF8)) {
            int playerId = br.ReadInt32 ();
            int ecosystemId = br.ReadInt32 ();
            int attemptId = br.ReadInt32 ();
            bool allowHints = br.ReadBoolean ();
            int hintId = br.ReadInt32 ();
            short fldSize = br.ReadInt16 ();
            String config = System.Text.Encoding.UTF8.GetString (br.ReadBytes (fldSize));
            fldSize = br.ReadInt16 ();
            String csv = System.Text.Encoding.UTF8.GetString (br.ReadBytes (fldSize));

            ConvergeAttempt attempt = new ConvergeAttempt (playerId,
                                                           ecosystemId,
                                                           attemptId,
                                                           allowHints,
                                                           hintId,
                                                           config,
                                                           csv
                                                           //null
                                                           );

            response.attempt = attempt;
        }

        return response;
    }
    public static NetworkResponse Parse(MemoryStream dataStream)
    {
        ResponseConvergePriorAttempt response = new ResponseConvergePriorAttempt();

        using (BinaryReader br = new BinaryReader(dataStream, Encoding.UTF8)) {
            int    playerId    = br.ReadInt32();
            int    ecosystemId = br.ReadInt32();
            int    attemptId   = br.ReadInt32();
            bool   allowHints  = br.ReadBoolean();
            int    hintId      = br.ReadInt32();
            short  fldSize     = br.ReadInt16();
            String config      = System.Text.Encoding.UTF8.GetString(br.ReadBytes(fldSize));
            fldSize = br.ReadInt16();
            String csv = System.Text.Encoding.UTF8.GetString(br.ReadBytes(fldSize));

            ConvergeAttempt attempt = new ConvergeAttempt(playerId,
                                                          ecosystemId,
                                                          attemptId,
                                                          allowHints,
                                                          hintId,
                                                          config,
                                                          csv,
                                                          null
                                                          );

            response.attempt = attempt;
        }

        return(response);
    }