line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Games::Go::Referee::Node; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
sub new { |
4
|
115
|
|
|
115
|
0
|
164
|
my $class = shift; |
5
|
115
|
|
|
|
|
186
|
my $self = {}; |
6
|
115
|
|
|
|
|
302
|
$self->{movecount} = shift; |
7
|
115
|
|
|
|
|
215
|
$self->{passcount} = shift; |
8
|
115
|
|
|
|
|
263
|
$self->{colour} = shift; |
9
|
115
|
|
|
|
|
230
|
$self->{point} = shift; # co-ordinates of the move |
10
|
115
|
|
|
|
|
218
|
$self->{board} = undef; # reference to '....xo...' (for a 3x3 board) |
11
|
115
|
|
|
|
|
181
|
$self->{captures} = undef; # reference to [0][12], [1][12] |
12
|
115
|
|
|
|
|
393
|
bless $self, $class; |
13
|
115
|
|
|
|
|
607
|
return $self; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub movecount { |
17
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
18
|
0
|
|
|
|
|
0
|
return $self->{movecount} |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub passcount { |
22
|
110
|
|
|
110
|
0
|
143
|
my $self = shift; |
23
|
110
|
50
|
|
|
|
325
|
$self->{passcount} = shift if @_; |
24
|
110
|
|
|
|
|
294
|
return $self->{passcount} |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub colour { |
28
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
29
|
0
|
0
|
|
|
|
0
|
$self->{colour} = shift if @_; |
30
|
0
|
|
|
|
|
0
|
return $self->{colour} |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub point { |
34
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
35
|
0
|
|
|
|
|
0
|
return $self->{point} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub board { |
39
|
120
|
|
|
120
|
0
|
199
|
my $self = shift; |
40
|
120
|
50
|
|
|
|
412
|
$self->{board} = shift if @_; |
41
|
120
|
|
|
|
|
392
|
return $self->{board} |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub captures { |
45
|
30
|
|
|
30
|
0
|
59
|
my $self = shift; |
46
|
30
|
50
|
|
|
|
92
|
$self->{captures} = shift if @_; |
47
|
30
|
|
|
|
|
71
|
return $self->{captures} |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
1; |