Example #1
0
        private void InvertChain(ChainOfAnimals curChain, ObservableCollection <ChainOfAnimals> chains)
        {
            var animals = InvertAnimalsPositions(curChain);

            InvertUpgradesLeftRight(animals);

            curChain.Animals = animals;
            ConvertChainsToAnimals(chains);
        }
Example #2
0
        private List <IAnimal> InvertAnimalsPositions(ChainOfAnimals curChain)
        {
            var animals = new List <IAnimal>();

            for (int i = curChain.Animals.Count - 1; i >= 0; i--)
            {
                animals.Add(curChain.Animals[i]);
            }
            return(animals);
        }