I have added a comment to your comment ;)
The regression tests now also will go through in trunk (SirVer fixed it) but
not here - maybe merging trunk will fix this.
Diff comments:
>
> === modified file 'src/ai/defaultai.cc'
> --- src/ai/defaultai.cc 2015-05-07 20:46:32 +0000
> +++ src/ai/defaultai.cc 2015-06-29 19:22:37 +0000
> @@ -253,8 +268,17 @@
> if (check_economies()) { // is a must
> return;
> };
> - taskDue[ScheduleTasks::kRoadCheck] = gametime + 400;
> - improve_roads(gametime);
> + taskDue[ScheduleTasks::kRoadCheck] = gametime + 1000;
> + // testing 5 roads
> + {
> + int32_t roads_to_check = (roads.size() + 1 < 5)
> ? roads.size() + 1 : 5;
> + for (int i = 0; i < roads_to_check; i += 1) {
> + if (improve_roads(gametime)) {
> + // if significant change takes
> place do not go on
> + break;
> + };
> + }
> + }
> break;
This makes sense, thanks for explaining. Maybe a comment along the lines of
"Each call of improve_roads() will move on to the next road to check)"?
Or maybe improve_roads() itself could go through all available roads each time?
> case ScheduleTasks::kUnbuildableFCheck :
> taskDue[ScheduleTasks::kUnbuildableFCheck] = gametime +
> 4000;
--
https://code.launchpad.net/~widelands-dev/widelands/trainingsites_and_teams/+merge/260517
Your team Widelands Developers is requested to review the proposed merge of
lp:~widelands-dev/widelands/trainingsites_and_teams into lp:widelands.
_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help : https://help.launchpad.net/ListHelp