Beispiel #1
0
 public virtual void WriteJsonFields(JsonTextWriter writer)
 {
     writer.WritePropertyName("SeedArray");
     SeedArray.WriteJson(writer);
     writer.WritePropertyName("inext");
     writer.WriteValue(inext);
     writer.WritePropertyName("inextp");
     writer.WriteValue(inextp);
 }
Beispiel #2
0
        public virtual void UpdateFrom(TWL.ZergRandom other)
        {
            var SeedArrayCount = other.SeedArray.Length;
            var SeedArrayTemp  = SeedArray;

            Array.Resize(ref SeedArrayTemp, SeedArrayCount);
            SeedArray = SeedArrayTemp;
            SeedArray.UpdateFrom(other.SeedArray);
            inext  = other.inext;
            inextp = other.inextp;
        }
Beispiel #3
0
 public virtual ulong CalculateHash()
 {
     System.UInt64 hash = 345093625;
     hash += (ulong)714987095;
     hash += hash << 11; hash ^= hash >> 7;
     hash += SeedArray.CalculateHash();
     hash += hash << 11; hash ^= hash >> 7;
     hash += (System.UInt64)inext;
     hash += hash << 11; hash ^= hash >> 7;
     hash += (System.UInt64)inextp;
     hash += hash << 11; hash ^= hash >> 7;
     return(hash);
 }
Beispiel #4
0
 public virtual void CompareCheck(TWL.ZergRandom other, Stack <string> path)
 {
     path.Push("SeedArray");
     SeedArray.CompareCheck(other.SeedArray, path);
     path.Pop();
     if (inext != other.inext)
     {
         SerializationTools.LogCompError(path, "inext", other.inext, inext);
     }
     if (inextp != other.inextp)
     {
         SerializationTools.LogCompError(path, "inextp", other.inextp, inextp);
     }
 }
Beispiel #5
0
        public virtual void ReadFromJsonField(JsonTextReader reader, string name)
        {
            switch (name)
            {
            case "SeedArray":
                SeedArray = SeedArray.ReadFromJson(reader);
                break;

            case "inext":
                inext = (int)(Int64)reader.Value;
                break;

            case "inextp":
                inextp = (int)(Int64)reader.Value;
                break;
            }
        }
Beispiel #6
0
 public virtual void Serialize(BinaryWriter writer)
 {
     SeedArray.Serialize(writer);
     writer.Write(inext);
     writer.Write(inextp);
 }