comparison agent.pl @ 237:a254fb798eb9

rules for branchOffice
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Thu, 06 Nov 2008 22:03:07 +0800
parents cf08e01f5713
children dc93eb48a926
comparison
equal deleted inserted replaced
236:cf08e01f5713 237:a254fb798eb9
47 } 47 }
48 48
49 sub is_museum_enough { 49 sub is_museum_enough {
50 my ($self, $city) = @_; 50 my ($self, $city) = @_;
51 return ($city->{buildings}->{museum} >= 2 ? 1 : 0); 51 return ($city->{buildings}->{museum} >= 2 ? 1 : 0);
52 }
53
54 sub is_branchOffice_enough {
55 my ($self, $city) = @_;
56 return ($city->{buildings}->{branchOffice} >= 6 ? 1 : 0);
52 } 57 }
53 58
54 sub is_space_enough { 59 sub is_space_enough {
55 my ($self, $city) = @_; 60 my ($self, $city) = @_;
56 # The maximum town hall is level 20, then we build new town 61 # The maximum town hall is level 20, then we build new town