Mercurial > eagle-eye
diff 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 |
line wrap: on
line diff
--- a/agent.pl Thu Nov 06 20:36:24 2008 +0800 +++ b/agent.pl Thu Nov 06 22:03:07 2008 +0800 @@ -51,6 +51,11 @@ return ($city->{buildings}->{museum} >= 2 ? 1 : 0); } +sub is_branchOffice_enough { + my ($self, $city) = @_; + return ($city->{buildings}->{branchOffice} >= 6 ? 1 : 0); +} + sub is_space_enough { my ($self, $city) = @_; # The maximum town hall is level 20, then we build new town