diff 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
line wrap: on
line diff
--- a/agent.pl	Mon Jan 12 22:25:46 2009 +0800
+++ b/agent.pl	Mon Jan 12 22:26:48 2009 +0800
@@ -57,7 +57,7 @@
 sub is_tavern_enough {
     my ($self, $city) = @_;
     return 0 if(!defined($city->{buildings}->{tavern}));
-    return 1 if($city->{buildings}->{tavern} >= 12);
+    return ($city->{buildings}->{tavern} >= 12 ? 1 : 0);
 }
 
 sub is_branchOffice_enough {