Mercurial > eagle-eye
comparison warfare.pl @ 205:d9f17bcbf1f1
we keep 10 transporters for prize
author | "Rex Tsai <chihchun@kalug.linux.org.tw>" |
---|---|
date | Mon, 03 Nov 2008 17:20:51 +0800 |
parents | dbdd7dcc91c6 |
children | 31fca1e55ed5 |
comparison
equal
deleted
inserted
replaced
204:95d47d69c202 | 205:d9f17bcbf1f1 |
---|---|
48 return ($city->{actionPoints} > ($city->{maxActionPoints}/2) ) ? 1 : 0; | 48 return ($city->{actionPoints} > ($city->{maxActionPoints}/2) ) ? 1 : 0; |
49 } | 49 } |
50 | 50 |
51 sub is_transporters_available { | 51 sub is_transporters_available { |
52 my ($self, $city) = @_; | 52 my ($self, $city) = @_; |
53 return ($city->{transporters}->{avail} > 0) ? 1 : 0; | 53 # we keep 10 transporters for prize |
54 return ($city->{transporters}->{avail} > 10) ? 1 : 0; | |
54 } | 55 } |
55 | 56 |
56 sub is_port_available { | 57 sub is_port_available { |
57 my ($self, $city) = @_; | 58 my ($self, $city) = @_; |
58 foreach(1..2) { | 59 foreach(1..2) { |