changeset 214:f6836ef11203

fixed a typo.
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Tue, 04 Nov 2008 15:13:00 +0800
parents 5f94d8d8370a
children 4aad04928f66
files agent.pl
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/agent.pl	Tue Nov 04 01:14:39 2008 +0800
+++ b/agent.pl	Tue Nov 04 15:13:00 2008 +0800
@@ -62,8 +62,8 @@
 
 sub is_safehouse_enough {
     my ($self, $city) = @_;
-    return 0 if(!defined($city->{building}->{safehouse}));
-    return (($city->{building}->{townHall} <= ($city->{building}->{safehouse} + 4)) ? 0 : 1);
+    return 0 if(!defined($city->{buildings}->{safehouse}));
+    return (($city->{buildings}->{townHall} <= ($city->{buildings}->{safehouse} + 4)) ? 0 : 1);
 }
 
 sub is_warehouse_enough {