Mercurial > eagle-eye
comparison agent.pl @ 275:c1333052a4ed
fixed a typo
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Tue, 02 Dec 2008 02:08:50 +0800 |
parents | c7f4a6f0fbde |
children | b2510d9339d8 |
comparison
equal
deleted
inserted
replaced
274:2590bcd517a5 | 275:c1333052a4ed |
---|---|
68 } | 68 } |
69 | 69 |
70 sub is_safehouse_enough { | 70 sub is_safehouse_enough { |
71 my ($self, $city) = @_; | 71 my ($self, $city) = @_; |
72 return 0 if(!defined($city->{buildings}->{safehouse})); | 72 return 0 if(!defined($city->{buildings}->{safehouse})); |
73 return 1 if($$city->{buildings}->{townHall} >= 20); | 73 return 1 if($city->{buildings}->{townHall} >= 20); |
74 | 74 |
75 # build the higgest safehouse. | 75 # build the higgest safehouse. |
76 # maybe we should have more then 4 towns, then we consider that we should upgrade safehouse at level 20. | 76 # maybe we should have more then 4 towns, then we consider that we should upgrade safehouse at level 20. |
77 # return (($city->{buildings}->{townHall} > $city->{buildings}->{safehouse}) ? 0 : 1) | 77 # return (($city->{buildings}->{townHall} > $city->{buildings}->{safehouse}) ? 0 : 1) |
78 # return (($city->{buildings}->{townHall} <= ($city->{buildings}->{safehouse} + 4)) ? 0 : 1); | 78 # return (($city->{buildings}->{townHall} <= ($city->{buildings}->{safehouse} + 4)) ? 0 : 1); |