Mercurial > eagle-eye
comparison agent.pl @ 318:e5e25d4a2c2f
merged
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Mon, 12 Jan 2009 22:26:48 +0800 |
parents | 2e0e47895148 a5d85719155d |
children | 61dd017416cf |
comparison
equal
deleted
inserted
replaced
317:2e0e47895148 | 318:e5e25d4a2c2f |
---|---|
55 } | 55 } |
56 | 56 |
57 sub is_tavern_enough { | 57 sub is_tavern_enough { |
58 my ($self, $city) = @_; | 58 my ($self, $city) = @_; |
59 return 0 if(!defined($city->{buildings}->{tavern})); | 59 return 0 if(!defined($city->{buildings}->{tavern})); |
60 return 1 if($city->{buildings}->{tavern} >= 12); | 60 return ($city->{buildings}->{tavern} >= 12 ? 1 : 0); |
61 } | 61 } |
62 | 62 |
63 sub is_branchOffice_enough { | 63 sub is_branchOffice_enough { |
64 my ($self, $city) = @_; | 64 my ($self, $city) = @_; |
65 return ($city->{buildings}->{branchOffice} >= 6 ? 1 : 0); | 65 return ($city->{buildings}->{branchOffice} >= 6 ? 1 : 0); |