diff options
Diffstat (limited to 'bin/ai')
-rw-r--r-- | bin/ai/regression/regression.nut | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/ai/regression/regression.nut b/bin/ai/regression/regression.nut index 1f8316043..8d0abe3b3 100644 --- a/bin/ai/regression/regression.nut +++ b/bin/ai/regression/regression.nut @@ -58,7 +58,7 @@ function Regression::TestInit() } list = AIList(); - list.Sort(AIAbstractList.SORT_BY_VALUE, true); + list.Sort(AIAbstractList.SORT_BY_VALUE, AIAbstractList.SORT_ASCENDING); print(""); print(" Value Ascending"); list.AddItem( 5, 10); @@ -93,7 +93,7 @@ function Regression::TestInit() } list = AIList(); - list.Sort(AIAbstractList.SORT_BY_ITEM, false); + list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_DESCENDING); print(""); print(" Item Descending"); list.AddItem( 5, 10); @@ -128,7 +128,7 @@ function Regression::TestInit() } list = AIList(); - list.Sort(AIAbstractList.SORT_BY_ITEM, true); + list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING); print(""); print(" Item Ascending"); list.AddItem( 5, 10); @@ -545,7 +545,7 @@ function Regression::Industry() print("--Industry--"); print(" GetIndustryCount(): " + AIIndustry.GetIndustryCount()); local list = AIIndustryList(); - list.Sort(AIAbstractList.SORT_BY_ITEM, true); + list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING); for (local i = list.Begin(); list.HasNext(); i = list.Next()) { if (AIIndustry.IsValidIndustry(i)) j++; print(" Industry " + i); @@ -667,7 +667,7 @@ function Regression::List() print(" HasItem(1050): " + list.HasItem(1050)); print(" HasItem(1051): " + list.HasItem(1051)); print(" IsEmpty(): " + list.IsEmpty()); - list.Sort(AIAbstractList.SORT_BY_ITEM, true); + list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING); print(" List Dump:"); for (local i = list.Begin(); list.HasNext(); i = list.Next()) { print(" " + i + " => " + list.GetValue(i)); @@ -1088,7 +1088,7 @@ function Regression::Sign() print(" RemoveSign(" + sign_id + "): " + AISign.RemoveSign(sign_id)); print(""); local list = AISignList(); - list.Sort(AIAbstractList.SORT_BY_ITEM, true); + list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING); for (local i = list.Begin(); list.HasNext(); i = list.Next()) { j++; print(" Sign " + i); @@ -1357,7 +1357,7 @@ function Regression::Town() print("--Town--"); print(" GetTownCount(): " + AITown.GetTownCount()); local list = AITownList(); - list.Sort(AIAbstractList.SORT_BY_ITEM, true); + list.Sort(AIAbstractList.SORT_BY_ITEM, AIAbstractList.SORT_ASCENDING); for (local i = list.Begin(); list.HasNext(); i = list.Next()) { if (AITown.IsValidTown(i)) j++; print(" Town " + i); |