comparison planner.pl @ 307:2972852a4ee5

added comment onn wingman
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Sun, 14 Dec 2008 02:35:53 +0800
parents 50cff2eee239
children 0db3e2bcbd0f
comparison
equal deleted inserted replaced
306:2f36120aba83 307:2972852a4ee5
69 69
70 # wingman, army 70 # wingman, army
71 foreach my $i (0..$#wingman) { 71 foreach my $i (0..$#wingman) {
72 my $cityId = $wingman[$i]; 72 my $cityId = $wingman[$i];
73 my $city = LoadFile(sprintf("city-%s-dump.yaml", $cityId)); 73 my $city = LoadFile(sprintf("city-%s-dump.yaml", $cityId));
74 $city->{type} = "wingman" . ($i+1);
74 if(defined($opt_w)) { 75 if(defined($opt_w)) {
75 $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 20) - ($i * 20 + 20); 76 $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 20) - ($i * 20 + 20);
76 } else { 77 } else {
77 $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 20); 78 $city->{distance} = travelTime($targetCity->island->x, $targetCity->island->y, $city->{island}->{x}, $city->{island}->{y}, 20);
78 } 79 }