line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catan::Map::Tile; |
2
|
|
|
|
|
|
|
$Catan::Map::Tile::VERSION = '0.02'; |
3
|
3
|
|
|
3
|
|
14
|
use strict; |
|
3
|
|
|
1
|
|
5
|
|
|
3
|
|
|
|
|
72
|
|
|
1
|
|
|
|
|
879
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
4
|
3
|
|
|
3
|
|
12
|
use warnings; |
|
3
|
|
|
1
|
|
6
|
|
|
3
|
|
|
|
|
72
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
5
|
3
|
|
|
3
|
|
1330
|
use parent 'Math::HexGrid::Hex'; |
|
3
|
|
|
1
|
|
666
|
|
|
3
|
|
|
|
|
17
|
|
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use overload |
8
|
3
|
|
|
|
|
20
|
'""' => 'uuid', |
|
1
|
|
|
|
|
4
|
|
9
|
3
|
|
|
3
|
|
5598
|
fallback => 1; |
|
3
|
|
|
1
|
|
1119
|
|
|
1
|
|
|
|
|
140
|
|
|
1
|
|
|
|
|
2
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new |
12
|
|
|
|
|
|
|
{ |
13
|
148
|
|
|
148
|
1
|
218
|
my ($class, $q, $r, $number) = @_; |
14
|
|
|
|
|
|
|
|
15
|
148
|
|
|
|
|
415
|
my $self = $class->SUPER::new($q, $r); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# yielding tiles need a number |
18
|
148
|
50
|
66
|
|
|
1637
|
die 'new() requires a number' if $class->yields && ! $number; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# non resource-producing yield nothing |
21
|
148
|
|
100
|
|
|
2119
|
$self->{number} = $number || 0; |
22
|
148
|
|
|
|
|
357
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
148
|
|
|
148
|
0
|
7656
|
sub uuid { $_[0]->{id} } |
26
|
0
|
|
|
0
|
0
|
0
|
sub number { $_[0]->{number} } |
27
|
76
|
|
|
76
|
0
|
202
|
sub yields { undef } |
28
|
0
|
|
|
0
|
0
|
|
sub name { $_[0]->{name} } |
29
|
0
|
|
|
0
|
0
|
|
sub code { $_[0]->{code} } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub tile_neighbor_uuid |
32
|
|
|
|
|
|
|
{ |
33
|
0
|
|
|
0
|
0
|
|
my ($self, $direction) = @_; |
34
|
0
|
|
|
|
|
|
return $self->SUPER::hex_neighbor($direction)->id; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |