changeset 313:a5d85719155d

fixed the if/else logic
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Tue, 06 Jan 2009 23:51:53 +0800
parents 4fb6b8154524
children 73430da45eec
files agent.pl
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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 {