summaryrefslogtreecommitdiff
path: root/bin/ai/regression
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-07-31 19:50:01 +0000
committeryexo <yexo@openttd.org>2009-07-31 19:50:01 +0000
commitc2ed8840123cc81f58b3db8d6341b22349b4ac78 (patch)
tree71e42277f511c8cdfa800e9d564d159e20b595ff /bin/ai/regression
parent0bb3d7030ffdd336acd0131a00b93c6aa1b26419 (diff)
downloadopenttd-c2ed8840123cc81f58b3db8d6341b22349b4ac78.tar.xz
(svn r17005) -Add [NoAI]: AIAbstractList::SORT_ASCENDING / SORT_DESCENDING
Diffstat (limited to 'bin/ai/regression')
-rw-r--r--bin/ai/regression/regression.nut14
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);