line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catan::Map::Tile; |
2
|
|
|
|
|
|
|
$Catan::Map::Tile::VERSION = '0.03'; |
3
|
3
|
|
|
3
|
|
16
|
use strict; |
|
3
|
|
|
1
|
|
7
|
|
|
3
|
|
|
|
|
78
|
|
|
1
|
|
|
|
|
774
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
4
|
3
|
|
|
3
|
|
14
|
use warnings; |
|
3
|
|
|
1
|
|
7
|
|
|
3
|
|
|
|
|
75
|
|
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
5
|
3
|
|
|
3
|
|
1471
|
use parent 'Math::HexGrid::Hex'; |
|
3
|
|
|
1
|
|
739
|
|
|
3
|
|
|
|
|
17
|
|
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use overload |
8
|
3
|
|
|
|
|
13
|
'""' => 'uuid', |
|
1
|
|
|
|
|
5
|
|
9
|
3
|
|
|
3
|
|
7708
|
fallback => 1; |
|
3
|
|
|
1
|
|
5
|
|
|
1
|
|
|
|
|
153
|
|
|
1
|
|
|
|
|
2
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new |
12
|
|
|
|
|
|
|
{ |
13
|
222
|
|
|
222
|
1
|
307
|
my ($class, $q, $r, $number) = @_; |
14
|
|
|
|
|
|
|
|
15
|
222
|
|
|
|
|
608
|
my $self = $class->SUPER::new($q, $r); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# yielding tiles need a number |
18
|
222
|
50
|
66
|
|
|
2672
|
die 'new() requires a number' if $class->yields && ! $number; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# non resource-producing yield nothing |
21
|
222
|
|
100
|
|
|
2407
|
$self->{number} = $number || 0; |
22
|
222
|
|
|
|
|
494
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
367583
|
|
|
367583
|
0
|
950085
|
sub uuid { $_[0]->{id} } |
26
|
1998
|
|
|
1998
|
0
|
5852
|
sub number { $_[0]->{number} } |
27
|
114
|
|
|
114
|
0
|
311
|
sub yields { undef } |
28
|
0
|
|
|
0
|
0
|
0
|
sub name { $_[0]->{name} } |
29
|
567
|
|
|
567
|
0
|
2201
|
sub code { $_[0]->{code} } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub tile_neighbor_uuid |
32
|
|
|
|
|
|
|
{ |
33
|
2664
|
|
|
2664
|
0
|
3535
|
my ($self, $direction) = @_; |
34
|
2664
|
|
|
|
|
6052
|
return $self->SUPER::hex_neighbor($direction)->id; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
1; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |