line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Games::ABC_Path::Solver::Coord; |
2
|
|
|
|
|
|
|
$Games::ABC_Path::Solver::Coord::VERSION = '0.6.1'; |
3
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
46
|
|
4
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
29
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
6
|
use parent 'Games::ABC_Path::Solver::Base'; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
72
|
use integer; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
9
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub x |
13
|
|
|
|
|
|
|
{ |
14
|
28465
|
|
|
28465
|
1
|
27124
|
my $self = shift; |
15
|
|
|
|
|
|
|
|
16
|
28465
|
100
|
|
|
|
34396
|
if (@_) |
17
|
|
|
|
|
|
|
{ |
18
|
8761
|
|
|
|
|
9901
|
$self->{x} = shift; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
28465
|
|
|
|
|
40154
|
return $self->{x}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub y |
27
|
|
|
|
|
|
|
{ |
28
|
27465
|
|
|
27465
|
1
|
26636
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
27465
|
100
|
|
|
|
33044
|
if (@_) |
31
|
|
|
|
|
|
|
{ |
32
|
8761
|
|
|
|
|
9250
|
$self->{'y'} = shift; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
27465
|
|
|
|
|
35018
|
return $self->{'y'}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub _to_s |
39
|
|
|
|
|
|
|
{ |
40
|
660
|
|
|
660
|
|
677
|
my $self = shift; |
41
|
|
|
|
|
|
|
|
42
|
660
|
|
|
|
|
720
|
return sprintf("%d,%d", $self->x, $self->y); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub _init |
46
|
|
|
|
|
|
|
{ |
47
|
8761
|
|
|
8761
|
|
9744
|
my ($self,$args) = @_; |
48
|
|
|
|
|
|
|
|
49
|
8761
|
|
|
|
|
13149
|
$self->x($args->{x}); |
50
|
8761
|
|
|
|
|
12987
|
$self->y($args->{'y'}); |
51
|
|
|
|
|
|
|
|
52
|
8761
|
|
|
|
|
10566
|
return; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub _equal |
56
|
|
|
|
|
|
|
{ |
57
|
625
|
|
|
625
|
|
671
|
my ($self,$other_xy) = @_; |
58
|
|
|
|
|
|
|
|
59
|
625
|
|
100
|
|
|
722
|
return (($self->x == $other_xy->x) && ($self->y == $other_xy->y)); |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
1; # End of Games::ABC_Path::Solver::Base |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |