Author: SerpentSerpent wrote: ↑Thu Oct 10, 2019 1:12 pm Funkcja sortująca jednostki malejąco wg. zadanej umiejętności. Dozwolone są tylko umiejętności od 1 do 4.
Code: Select all
Export Function SortBySkill(units, class); var i, tmp; begin if not units or not class in [1, 2, 3, 4] then exit; tmp := []; for i in units do tmp := Insert(tmp, tmp+1, GetSkill(i, class)); if not tmp then exit; result := SortListByListDesc(units, tmp); End;
Topic: viewtopic.php?f=42&t=6055