# HG changeset patch # User "Rex Tsai " # Date 1231257113 -28800 # Node ID a5d85719155de5e870ebcc17d70e272a44ac6b3a # Parent 4fb6b8154524b04e1ad7a91314c25a9180948b72 fixed the if/else logic diff -r 4fb6b8154524 -r a5d85719155d agent.pl --- a/agent.pl Mon Jan 05 00:19:10 2009 +0800 +++ b/agent.pl Tue Jan 06 23:51:53 2009 +0800 @@ -56,7 +56,7 @@ sub is_tavern_enough { my ($self, $city) = @_; return 0 if(!defined($city->{buildings}->{tavern})); - return 1 if($city->{buildings}->{museum} >= 12); + return ($city->{buildings}->{museum} >= 12 ? 1 : 0); } sub is_branchOffice_enough {