public void SortAnimalEnergy() { AllAnimals.Sort(ani => ani.RelativeEnergy, IsAscendSortG); IsAscendSortG = !IsAscendSortG; }
/// <summary> /// Sorts by group, ascending or descending. /// </summary> public void SortAnimalType() { AllAnimals.Sort(ani => ani.Type, IsAscendSortT); //Switch boolean to sort in opposite order next click. IsAscendSortT = !IsAscendSortT; }