Пример #1
0
        public Breed(
			Monster inResult,
			IBreedable inParent1,
			IBreedable inParent2,
			int? inRequiredDepth
		)
        {
            this.Result = inResult;
            this.Parent1 = inParent1;
            this.Parent2 = inParent2;
            this.RequiredDepth = inRequiredDepth;
        }
Пример #2
0
        public BreedNode(Monster startMonster, List<Breed> BreedList)
        {
            if(!BreedList.AsQueryable().Where(x => x.Result.Name.ToUpper() == startMonster.Name.ToUpper()).Any())
            {
                thisBreed = startMonster;
                this.Parent1 = null;
                this.Parent2 = null;
                this.Cost = 10;
            }
            else
            {
                BreedNode result = BreedNodeInner(startMonster, BreedList, new List<Monster>(), new List<BreedNode>());

                this.thisBreed = result.thisBreed;
                this.Parent1 = result.Parent1;
                this.Parent2 = result.Parent2;
                this.Cost = result.Cost;
            }
        }