bin/ai/regression/regression.nut
branchnoai
changeset 9649 bc8c06513f5b
parent 9648 760b7b504e37
child 9652 c15bf5355b95
equal deleted inserted replaced
9648:760b7b504e37 9649:bc8c06513f5b
   127 		print("    GetName():         " + industry.GetName(i));
   127 		print("    GetName():         " + industry.GetName(i));
   128 		print("    GetLocation():     " + industry.GetLocation(i));
   128 		print("    GetLocation():     " + industry.GetLocation(i));
   129 	}
   129 	}
   130 	print("  Valid Industries:    " + j);
   130 	print("  Valid Industries:    " + j);
   131 	print("  GetIndustryCount():  " + industry.GetIndustryCount());
   131 	print("  GetIndustryCount():  " + industry.GetIndustryCount());
       
   132 }
       
   133 
       
   134 function Regression::IndustryList()
       
   135 {
       
   136 	local list = AIIndustryList();
       
   137 
       
   138 	print("");
       
   139 	print("--IndustryList--");
       
   140 	print("  Count():             " + list.Count());
       
   141 	list.Valuate(AIIndustryListLocation());
       
   142 	print("  Location ListDump:");
       
   143 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
       
   144 		print("    " + i + " => " + list.GetValue(i));
       
   145 	}
       
   146 	list.Valuate(AIIndustryListProduction(1));
       
   147 	list.KeepAboveValue(50);
       
   148 	print("  KeepAboveValue(50): done");
       
   149 	print("  Count():             " + list.Count());
       
   150 	print("  Production ListDump:");
       
   151 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
       
   152 		print("    " + i + " => " + list.GetValue(i));
       
   153 	}
   132 }
   154 }
   133 
   155 
   134 function Regression::List()
   156 function Regression::List()
   135 {
   157 {
   136 	local list = AIList();
   158 	local list = AIList();
   462 	local list = AITownList();
   484 	local list = AITownList();
   463 
   485 
   464 	print("");
   486 	print("");
   465 	print("--TownList--");
   487 	print("--TownList--");
   466 	print("  Count():             " + list.Count());
   488 	print("  Count():             " + list.Count());
       
   489 	list.Valuate(AITownListLocation());
       
   490 	print("  Location ListDump:");
       
   491 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
       
   492 		print("    " + i + " => " + list.GetValue(i));
       
   493 	}
   467 	list.Valuate(AITownListPopulation());
   494 	list.Valuate(AITownListPopulation());
   468 	list.KeepAboveValue(500);
   495 	list.KeepAboveValue(500);
   469 	print("  KeepAboveValue(500): done");
   496 	print("  KeepAboveValue(500): done");
   470 	print("  Count():             " + list.Count());
   497 	print("  Count():             " + list.Count());
   471 	print("  ListDump:");
   498 	print("  Population ListDump:");
   472 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
   499 	for (local i = list.Begin(); list.HasNext(); i = list.Next()) {
   473 		print("    " + i + " => " + list.GetValue(i));
   500 		print("    " + i + " => " + list.GetValue(i));
   474 	}
   501 	}
   475 }
   502 }
   476 
   503 
   601 	this.Std();
   628 	this.Std();
   602 	this.Base();
   629 	this.Base();
   603 	this.Cargo();
   630 	this.Cargo();
   604 	this.Company();
   631 	this.Company();
   605 	this.Industry();
   632 	this.Industry();
       
   633 	this.IndustryList();
   606 	this.Map();
   634 	this.Map();
   607 	this.List();
   635 	this.List();
   608 	this.Road();
   636 	this.Road();
   609 	this.Sign();
   637 	this.Sign();
   610 	this.Station();
   638 	this.Station();