Beispiel #1
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            bytes.RestorePreviosReadLimit();
        }
        /// <summary>
        /// This method decodes a message from a byte list
        /// </summary>
        /// <param name="bytes"></param>
        virtual public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            MessageNr      = bytes.GetDistributableObject() as MessageNumber;
            ConversationId = bytes.GetDistributableObject() as MessageNumber;

            bytes.RestorePreviosReadLimit();
        }
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            Layout = bytes.GetDistributableObject() as PlayingFieldLayout;

            bytes.RestorePreviosReadLimit();
        }
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            Configuration = bytes.GetDistributableObject() as GameConfiguration;

            bytes.RestorePreviosReadLimit();
        }
        /// <summary>
        /// This method decodes a message from a byte list
        /// </summary>
        /// <param name="bytes"></param>
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            RequestType = (PossibleTypes)Convert.ToInt32(bytes.GetByte());

            bytes.RestorePreviosReadLimit();
        }
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            Component = bytes.GetDistributableObject() as AgentInfo;

            bytes.RestorePreviosReadLimit();
        }
Beispiel #7
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            EnablingTick = bytes.GetDistributableObject() as Tick;

            bytes.RestorePreviosReadLimit();
        }
Beispiel #8
0
        /// <summary>
        /// This method decodes a message from a byte list
        /// </summary>
        /// <param name="bytes"></param>
        public override void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            ReplyType = (PossibleTypes)Convert.ToInt32(bytes.GetByte());
            Status    = (PossibleStatus)Convert.ToInt32(bytes.GetByte());
            Note      = bytes.GetString();

            bytes.RestorePreviosReadLimit();
        }
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            IntResult = bytes.GetInt32();
            ObjResult = bytes.GetDistributableObject();
            Message   = bytes.GetString();

            bytes.RestorePreviosReadLimit();
        }
Beispiel #10
0
        override public void Decode(ByteList bytes)
        {
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            ThrowingBrilliantStudentId = bytes.GetInt16();
            Bomb          = bytes.GetDistributableObject() as Bomb;
            TowardsSquare = bytes.GetDistributableObject() as FieldLocation;
            EnablingTick  = bytes.GetDistributableObject() as Tick;

            bytes.RestorePreviosReadLimit();
        }
Beispiel #11
0
        override public void Decode(ByteList bytes)
        {
            log.Debug("Decoding JoinGame");
            Int16 objType   = bytes.GetInt16();
            Int16 objLength = bytes.GetInt16();

            log.DebugFormat("objType={0}, objLength={1}", objType, objLength);

            bytes.SetNewReadLimit(objLength);

            base.Decode(bytes);

            GameId = bytes.GetInt16();
            log.DebugFormat("GameId={0}", GameId);
            AgentInfo = bytes.GetDistributableObject() as AgentInfo;
            log.DebugFormat("AgentInfo.AgentType={0}, ANumber={1}, FirstName={2}, LastName={3}", AgentInfo.AgentType, AgentInfo.ANumber, AgentInfo.FirstName, AgentInfo.LastName);

            bytes.RestorePreviosReadLimit();
            log.DebugFormat("Decoding of JoinGame Complete");
        }