line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catan::Asset::DevelopmentCard; |
2
|
|
|
|
|
|
|
$Catan::Asset::DevelopmentCard::VERSION = '0.02'; |
3
|
4
|
|
|
4
|
|
19
|
use strict; |
|
4
|
|
|
1
|
|
6
|
|
|
4
|
|
|
|
|
105
|
|
|
1
|
|
|
|
|
878
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
21
|
|
4
|
4
|
|
|
4
|
|
18
|
use warnings; |
|
4
|
|
|
1
|
|
6
|
|
|
4
|
|
|
|
|
86
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
5
|
4
|
|
|
4
|
|
19
|
use Catan::Resource::Ore; |
|
4
|
|
|
1
|
|
7
|
|
|
4
|
|
|
|
|
94
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
6
|
4
|
|
|
4
|
|
17
|
use Catan::Resource::Grain; |
|
4
|
|
|
1
|
|
11
|
|
|
4
|
|
|
|
|
73
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
7
|
4
|
|
|
4
|
|
22
|
use Catan::Resource::Wool; |
|
4
|
|
|
1
|
|
4
|
|
|
4
|
|
|
|
|
1016
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
550
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our %types = ( |
10
|
|
|
|
|
|
|
KN => 'Knight', |
11
|
|
|
|
|
|
|
MO => 'Monopoly', |
12
|
|
|
|
|
|
|
RB => 'Road Building', |
13
|
|
|
|
|
|
|
VP => 'Victory Point', |
14
|
|
|
|
|
|
|
YP => 'Year of Plenty', |
15
|
|
|
|
|
|
|
); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub new |
18
|
|
|
|
|
|
|
{ |
19
|
0
|
|
|
0
|
0
|
|
my ($class, $type) = @_; |
20
|
|
|
|
|
|
|
die "$class new requires a type argument" |
21
|
0
|
0
|
0
|
|
|
|
unless $type && exists $types{$type}; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
bless { |
24
|
|
|
|
|
|
|
type => $type, |
25
|
|
|
|
|
|
|
code => 'DC', |
26
|
|
|
|
|
|
|
}, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
0
|
|
sub code { $_[0]->{code} } |
30
|
0
|
|
|
0
|
0
|
|
sub type { $_[0]->{type} } |
31
|
0
|
|
|
0
|
0
|
|
sub type_name { $types{ $_[0]->{type} } } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub cost |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
return [ |
36
|
0
|
|
|
0
|
0
|
|
Catan::Resource::Ore->new(-1), |
37
|
|
|
|
|
|
|
Catan::Resource::Grain->new(-1), |
38
|
|
|
|
|
|
|
Catan::Resource::Wool->new(-1), |
39
|
|
|
|
|
|
|
]; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |