Mercurial > eagle-eye
comparison agent.pl @ 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 | 978a949602e5 afd3f5cb8597 a89e049d1d31 |
comparison
equal
deleted
inserted
replaced
212:5f94d8d8370a | 214:f6836ef11203 |
---|---|
60 return ($city->{space}->{total} <= ($city->{space}->{occupied} + ($city->{growth}*8)) ? 0 : 1) | 60 return ($city->{space}->{total} <= ($city->{space}->{occupied} + ($city->{growth}*8)) ? 0 : 1) |
61 } | 61 } |
62 | 62 |
63 sub is_safehouse_enough { | 63 sub is_safehouse_enough { |
64 my ($self, $city) = @_; | 64 my ($self, $city) = @_; |
65 return 0 if(!defined($city->{building}->{safehouse})); | 65 return 0 if(!defined($city->{buildings}->{safehouse})); |
66 return (($city->{building}->{townHall} <= ($city->{building}->{safehouse} + 4)) ? 0 : 1); | 66 return (($city->{buildings}->{townHall} <= ($city->{buildings}->{safehouse} + 4)) ? 0 : 1); |
67 } | 67 } |
68 | 68 |
69 sub is_warehouse_enough { | 69 sub is_warehouse_enough { |
70 my ($self, $city) = @_; | 70 my ($self, $city) = @_; |
71 my @warehouse = (qw/undef undef 0 4 9 16 18 19 20 21 22 23 24 25/); | 71 my @warehouse = (qw/undef undef 0 4 9 16 18 19 20 21 22 23 24 25/); |