From c2ed8840123cc81f58b3db8d6341b22349b4ac78 Mon Sep 17 00:00:00 2001 From: yexo Date: Fri, 31 Jul 2009 19:50:01 +0000 Subject: (svn r17005) -Add [NoAI]: AIAbstractList::SORT_ASCENDING / SORT_DESCENDING --- bin/ai/regression/regression.nut | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bin/ai/regression') 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); -- cgit v1.2.3-70-g09d2