line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catan::Asset::DevelopmentCard; |
2
|
|
|
|
|
|
|
$Catan::Asset::DevelopmentCard::VERSION = '0.03'; |
3
|
4
|
|
|
4
|
|
20
|
use strict; |
|
4
|
|
|
1
|
|
7
|
|
|
4
|
|
|
|
|
103
|
|
|
1
|
|
|
|
|
750
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
4
|
4
|
|
|
4
|
|
19
|
use warnings; |
|
4
|
|
|
1
|
|
6
|
|
|
4
|
|
|
|
|
95
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
5
|
4
|
|
|
4
|
|
24
|
use Catan::Resource::Ore; |
|
4
|
|
|
1
|
|
7
|
|
|
4
|
|
|
|
|
103
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
6
|
4
|
|
|
4
|
|
18
|
use Catan::Resource::Grain; |
|
4
|
|
|
1
|
|
6
|
|
|
4
|
|
|
|
|
75
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
7
|
4
|
|
|
4
|
|
18
|
use Catan::Resource::Wool; |
|
4
|
|
|
1
|
|
5
|
|
|
4
|
|
|
|
|
936
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
293
|
|
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
|
8
|
|
|
8
|
0
|
19
|
my ($class, $type) = @_; |
20
|
|
|
|
|
|
|
die "$class new requires a type argument" |
21
|
8
|
50
|
33
|
|
|
42
|
unless $type && exists $types{$type}; |
22
|
|
|
|
|
|
|
|
23
|
8
|
|
|
|
|
40
|
bless { |
24
|
|
|
|
|
|
|
type => $type, |
25
|
|
|
|
|
|
|
code => 'DC', |
26
|
|
|
|
|
|
|
}, $class; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
0
|
0
|
sub code { $_[0]->{code} } |
30
|
41
|
|
|
41
|
0
|
224
|
sub type { $_[0]->{type} } |
31
|
0
|
|
|
0
|
0
|
0
|
sub type_name { $types{ $_[0]->{type} } } |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub cost |
34
|
|
|
|
|
|
|
{ |
35
|
|
|
|
|
|
|
return [ |
36
|
8
|
|
|
8
|
0
|
43
|
Catan::Resource::Ore->new(-1), |
37
|
|
|
|
|
|
|
Catan::Resource::Grain->new(-1), |
38
|
|
|
|
|
|
|
Catan::Resource::Wool->new(-1), |
39
|
|
|
|
|
|
|
]; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |