summaryrefslogtreecommitdiff
path: root/bin/ai/regression
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-04-26 16:26:41 +0000
committerfrosch <frosch@openttd.org>2009-04-26 16:26:41 +0000
commite04ddbe0ac4ed41853852c35666c551407c226b4 (patch)
tree431a7fb7017dfb4f34b6e6d0e4d89cc6de4ae756 /bin/ai/regression
parent9101de49d8fbc0b1f5e067ca2cd8c5906f30e84a (diff)
downloadopenttd-e04ddbe0ac4ed41853852c35666c551407c226b4.tar.xz
(svn r16166) -Add [NoAI]: AITile::Get(Min|Max|Corner)Height
Diffstat (limited to 'bin/ai/regression')
-rw-r--r--bin/ai/regression/regression.nut28
-rw-r--r--bin/ai/regression/regression.txt263
2 files changed, 202 insertions, 89 deletions
diff --git a/bin/ai/regression/regression.nut b/bin/ai/regression/regression.nut
index 02f2e55bf..8b77879bd 100644
--- a/bin/ai/regression/regression.nut
+++ b/bin/ai/regression/regression.nut
@@ -1189,7 +1189,7 @@ function Regression::TileList()
print("");
print("--TileList--");
print(" Count(): " + list.Count());
- list.AddRectangle(41895 - 256 * 2, 256 * 2 + 41895 + 8);
+ list.AddRectangle(34436, 256 * 2 + 34436 + 8);
print(" Count(): " + list.Count());
list.Valuate(AITile.GetHeight);
@@ -1200,6 +1200,30 @@ function Regression::TileList()
print(" " + i + " => " + list.GetValue(i));
}
+ list.Valuate(AITile.GetCornerHeight, AITile.CORNER_N);
+ print(" CornerHeight(North): done");
+ print(" Count(): " + list.Count());
+ print(" ListDump:");
+ for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
+ print(" " + i + " => " + list.GetValue(i));
+ }
+
+ list.Valuate(AITile.GetMinHeight);
+ print(" MinHeight(): done");
+ print(" Count(): " + list.Count());
+ print(" ListDump:");
+ for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
+ print(" " + i + " => " + list.GetValue(i));
+ }
+
+ list.Valuate(AITile.GetMaxHeight);
+ print(" MaxHeight(): done");
+ print(" Count(): " + list.Count());
+ print(" ListDump:");
+ for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
+ print(" " + i + " => " + list.GetValue(i));
+ }
+
list.Valuate(AITile.GetSlope);
list.KeepValue(0);
print(" Slope(): done");
@@ -1210,6 +1234,8 @@ function Regression::TileList()
print(" " + i + " => " + list.GetValue(i));
}
+ list.Clear();
+ list.AddRectangle(41895 - 256 * 2, 256 * 2 + 41895 + 8);
list.Valuate(AITile.IsBuildable);
list.KeepValue(1);
print(" Buildable(): done");
diff --git a/bin/ai/regression/regression.txt b/bin/ai/regression/regression.txt
index c3c793179..5a7c96d2a 100644
--- a/bin/ai/regression/regression.txt
+++ b/bin/ai/regression/regression.txt
@@ -7366,125 +7366,178 @@
--TileList--
Count(): 0
- Count(): 45
+ Count(): 27
Height(): done
- Count(): 45
+ Count(): 27
ListDump:
- 42411 => 2
- 42410 => 2
- 42409 => 2
- 42408 => 2
- 42407 => 2
- 42154 => 2
- 42153 => 2
- 42152 => 2
- 42151 => 2
- 41898 => 2
- 41897 => 2
- 41896 => 2
- 41895 => 2
- 41642 => 2
- 41641 => 2
- 41640 => 2
- 41639 => 2
- 41386 => 2
- 41385 => 2
- 41384 => 2
- 41383 => 2
- 42415 => 1
- 42414 => 1
- 42413 => 1
- 42412 => 1
- 42159 => 1
- 42158 => 1
- 42157 => 1
- 42156 => 1
- 42155 => 1
- 41903 => 1
- 41902 => 1
- 41901 => 1
- 41900 => 1
- 41899 => 1
- 41647 => 1
- 41646 => 1
- 41645 => 1
- 41644 => 1
- 41643 => 1
- 41391 => 1
- 41390 => 1
- 41389 => 1
- 41388 => 1
- 41387 => 1
+ 34956 => 4
+ 34700 => 4
+ 34444 => 4
+ 34955 => 3
+ 34954 => 3
+ 34953 => 3
+ 34699 => 3
+ 34698 => 3
+ 34697 => 3
+ 34693 => 3
+ 34692 => 3
+ 34443 => 3
+ 34442 => 3
+ 34441 => 3
+ 34439 => 3
+ 34438 => 3
+ 34437 => 3
+ 34436 => 3
+ 34952 => 2
+ 34951 => 2
+ 34950 => 2
+ 34949 => 2
+ 34948 => 2
+ 34696 => 2
+ 34695 => 2
+ 34694 => 2
+ 34440 => 2
+ CornerHeight(North): done
+ Count(): 27
+ ListDump:
+ 34956 => 4
+ 34700 => 4
+ 34444 => 4
+ 34955 => 3
+ 34954 => 3
+ 34953 => 3
+ 34699 => 3
+ 34698 => 3
+ 34697 => 3
+ 34693 => 3
+ 34692 => 3
+ 34443 => 3
+ 34442 => 3
+ 34441 => 3
+ 34439 => 3
+ 34438 => 3
+ 34437 => 3
+ 34436 => 3
+ 34952 => 2
+ 34951 => 2
+ 34950 => 2
+ 34949 => 2
+ 34948 => 2
+ 34696 => 2
+ 34695 => 2
+ 34694 => 2
+ 34440 => 2
+ MinHeight(): done
+ Count(): 27
+ ListDump:
+ 34956 => 4
+ 34700 => 4
+ 34444 => 4
+ 34955 => 3
+ 34954 => 3
+ 34953 => 3
+ 34699 => 3
+ 34698 => 3
+ 34697 => 3
+ 34443 => 3
+ 34442 => 3
+ 34441 => 3
+ 34436 => 3
+ 34952 => 2
+ 34951 => 2
+ 34950 => 2
+ 34949 => 2
+ 34948 => 2
+ 34696 => 2
+ 34695 => 2
+ 34694 => 2
+ 34693 => 2
+ 34692 => 2
+ 34440 => 2
+ 34439 => 2
+ 34438 => 2
+ 34437 => 2
+ MaxHeight(): done
+ Count(): 27
+ ListDump:
+ 34956 => 4
+ 34955 => 4
+ 34700 => 4
+ 34699 => 4
+ 34444 => 4
+ 34443 => 4
+ 34954 => 3
+ 34953 => 3
+ 34952 => 3
+ 34951 => 3
+ 34950 => 3
+ 34949 => 3
+ 34948 => 3
+ 34698 => 3
+ 34697 => 3
+ 34696 => 3
+ 34693 => 3
+ 34692 => 3
+ 34442 => 3
+ 34441 => 3
+ 34440 => 3
+ 34439 => 3
+ 34438 => 3
+ 34437 => 3
+ 34436 => 3
+ 34695 => 2
+ 34694 => 2
Slope(): done
KeepValue(0): done
- Count(): 38
+ Count(): 12
ListDump:
- 42415 => 0
- 42414 => 0
- 42413 => 0
- 42410 => 0
- 42409 => 0
- 42408 => 0
- 42407 => 0
- 42159 => 0
- 42158 => 0
- 42157 => 0
- 42156 => 0
- 42153 => 0
- 42152 => 0
- 42151 => 0
- 41903 => 0
- 41902 => 0
- 41901 => 0
- 41900 => 0
- 41899 => 0
- 41897 => 0
- 41896 => 0
- 41895 => 0
- 41647 => 0
- 41646 => 0
- 41645 => 0
- 41644 => 0
- 41643 => 0
- 41641 => 0
- 41640 => 0
- 41639 => 0
- 41391 => 0
- 41390 => 0
- 41389 => 0
- 41388 => 0
- 41387 => 0
- 41385 => 0
- 41384 => 0
- 41383 => 0
+ 34956 => 0
+ 34954 => 0
+ 34953 => 0
+ 34700 => 0
+ 34698 => 0
+ 34697 => 0
+ 34695 => 0
+ 34694 => 0
+ 34444 => 0
+ 34442 => 0
+ 34441 => 0
+ 34436 => 0
Buildable(): done
KeepValue(1): done
- Count(): 28
+ Count(): 35
BuildableRectangle(3, 3) ListDump:
42415 => 1
42414 => 1
42413 => 1
+ 42412 => 1
+ 42411 => 1
42410 => 1
42159 => 1
42158 => 1
42157 => 1
42156 => 1
+ 42155 => 1
+ 42154 => 1
41903 => 1
41902 => 1
41901 => 1
41900 => 1
41899 => 1
+ 41898 => 1
41647 => 1
41646 => 1
41645 => 1
41644 => 1
41643 => 1
+ 41642 => 1
41641 => 1
41391 => 1
41390 => 1
41389 => 1
41388 => 1
41387 => 1
+ 41386 => 1
41385 => 1
42153 => 0
41897 => 0
@@ -7496,26 +7549,33 @@
42413 => 173
42158 => 173
41903 => 173
+ 42412 => 172
42157 => 172
41902 => 172
41647 => 172
+ 42411 => 171
42156 => 171
41901 => 171
41646 => 171
41391 => 171
42410 => 170
+ 42155 => 170
41900 => 170
41645 => 170
41390 => 170
+ 42154 => 169
41899 => 169
41644 => 169
41389 => 169
42153 => 168
+ 41898 => 168
41643 => 168
41388 => 168
41897 => 167
+ 41642 => 167
41387 => 167
41641 => 166
+ 41386 => 166
41385 => 165
41384 => 164
DistanceSquareToTile(30000) ListDump:
@@ -7532,17 +7592,24 @@
42157 => 17834
41390 => 17812
41901 => 17741
+ 42412 => 17680
41645 => 17650
42156 => 17585
41389 => 17561
41900 => 17492
+ 42411 => 17433
41644 => 17401
+ 42155 => 17338
41388 => 17312
41899 => 17245
42410 => 17188
41643 => 17154
+ 42154 => 17093
41387 => 17065
+ 41898 => 17000
+ 41642 => 16909
42153 => 16850
+ 41386 => 16820
41897 => 16757
41641 => 16666
41385 => 16577
@@ -7551,63 +7618,77 @@
42415 => -1
42414 => -1
42413 => -1
+ 42412 => -1
+ 42411 => -1
42410 => -1
42159 => -1
42158 => -1
42157 => -1
42156 => -1
+ 42155 => -1
+ 42154 => -1
42153 => -1
41903 => -1
41902 => -1
41901 => -1
41900 => -1
41899 => -1
+ 41898 => -1
41897 => -1
41647 => -1
41646 => -1
41645 => -1
41644 => -1
41643 => -1
+ 41642 => -1
41641 => -1
41391 => -1
41390 => -1
41389 => -1
41388 => -1
41387 => -1
+ 41386 => -1
41385 => -1
41384 => -1
GetClosestTown() ListDump:
42415 => 3
42414 => 3
42413 => 3
+ 42412 => 3
+ 42411 => 3
42410 => 3
42159 => 3
42158 => 3
42157 => 3
42156 => 3
+ 42155 => 3
+ 42154 => 3
42153 => 3
41903 => 3
41902 => 3
41901 => 3
41900 => 3
41899 => 3
+ 41898 => 3
41897 => 3
41647 => 3
41646 => 3
41645 => 3
41644 => 3
41643 => 3
+ 41642 => 3
41641 => 3
41391 => 3
41390 => 3
41389 => 3
41388 => 3
41387 => 3
+ 41386 => 3
41385 => 3
41384 => 3
CargoAcceptance(): done
KeepAboveValue(10): done
- Count(): 9
+ Count(): 15
ListDump:
41897 => 29
41385 => 26
@@ -7615,9 +7696,15 @@
42153 => 25
41641 => 23
41899 => 17
+ 41898 => 17
41387 => 17
+ 41386 => 17
41643 => 14
+ 41642 => 14
+ 42411 => 13
42410 => 13
+ 42155 => 13
+ 42154 => 13
RoadTile(): done
KeepValue(1): done
Count(): 0