Пример #1
0
        internal AlchemKey Process(AlchemKey alchemieKey)
        {
            var firstPart  = new AlchemPack(Get(this.NewOrder[0]), Get(this.NewOrder[1]), Get(this.NewOrder[2]), Get(this.NewOrder[3]));
            var secondPart = new AlchemPack(Get(this.NewOrder[4]), Get(this.NewOrder[5]), Get(this.NewOrder[6]), Get(this.NewOrder[7]));
            var thirdPart  = new AlchemPack(Get(this.NewOrder[8]), Get(this.NewOrder[9]), Get(this.NewOrder[10]), Get(this.NewOrder[11]));

            return(new AlchemKey(firstPart, secondPart, thirdPart));


            AlchemieDigit Get(int i)
            {
                if (i < 4)
                {
                    return(alchemieKey[0][i]);
                }
                else if (i < 8)
                {
                    return(alchemieKey[1][i - 4]);
                }
                else if (i < 12)
                {
                    return(alchemieKey[2][i - 8]);
                }
                throw new ArgumentOutOfRangeException(nameof(i), i, "must be between 0 and 11 (inclusive)");
            }
        }
Пример #2
0
 public Ingredient(string name, uint order, IEnumerable <string> propertys, AlchemKey alchemieKey)
 {
     this.Name        = name ?? throw new ArgumentNullException(nameof(name));
     this.Order       = order;
     this.Propertys   = propertys?.ToImmutableHashSet() ?? throw new ArgumentNullException(nameof(propertys));
     this.AlchemieKey = alchemieKey;
 }