comparison agent.pl @ 59:b40f87f16263

fixed a typo.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Tue, 21 Oct 2008 00:50:37 +0800
parents 46e60bb040ad
children 6eccb3a95df5
comparison
equal deleted inserted replaced
58:46e60bb040ad 59:b40f87f16263
41 sub is_corruption { 41 sub is_corruption {
42 my ($self, $city) = @_; 42 my ($self, $city) = @_;
43 return 0; 43 return 0;
44 } 44 }
45 45
46 sub is_happiness 46 sub is_happiness {
47 {
48 my ($self, $city) = @_; 47 my ($self, $city) = @_;
49 # TODO 以 fuzzy 取出合理 happiness 值 48 # TODO 以 fuzzy 取出合理 happiness 值
50 return ($city->{happiness} >= 2 ? 1 : 0) 49 return ($city->{happiness} >= 2 ? 1 : 0)
51 } 50 }
52 51
107 sub is_professionalarmy_researched { 106 sub is_professionalarmy_researched {
108 my ($self, $city) = @_; 107 my ($self, $city) = @_;
109 return (defined($city->{research}->{4030}) ? 1 : 0); 108 return (defined($city->{research}->{4030}) ? 1 : 0);
110 } 109 }
111 110
112 sub is_paper_research { 111 sub is_paper_researched {
113 my ($self, $city) = @_; 112 my ($self, $city) = @_;
114 return (defined($city->{research}->{3020}) ? 1 : 0); 113 return (defined($city->{research}->{3020}) ? 1 : 0);
115 } 114 }
116 115
117 sub is_drydock_researched { 116 sub is_drydock_researched {