private void InvertChain(ChainOfAnimals curChain, ObservableCollection <ChainOfAnimals> chains) { var animals = InvertAnimalsPositions(curChain); InvertUpgradesLeftRight(animals); curChain.Animals = animals; ConvertChainsToAnimals(chains); }
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); }