line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Games::ABC_Path::Solver::Coord; |
2
|
|
|
|
|
|
|
$Games::ABC_Path::Solver::Coord::VERSION = '0.6.0'; |
3
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
52
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
40
|
|
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
10
|
use parent 'Games::ABC_Path::Solver::Base'; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
9
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
2
|
|
|
2
|
|
98
|
use integer; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
11
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub x |
13
|
|
|
|
|
|
|
{ |
14
|
28465
|
|
|
28465
|
1
|
32674
|
my $self = shift; |
15
|
|
|
|
|
|
|
|
16
|
28465
|
100
|
|
|
|
40786
|
if (@_) |
17
|
|
|
|
|
|
|
{ |
18
|
8761
|
|
|
|
|
12315
|
$self->{x} = shift; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
28465
|
|
|
|
|
49739
|
return $self->{x}; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub y |
27
|
|
|
|
|
|
|
{ |
28
|
27465
|
|
|
27465
|
1
|
31511
|
my $self = shift; |
29
|
|
|
|
|
|
|
|
30
|
27465
|
100
|
|
|
|
39459
|
if (@_) |
31
|
|
|
|
|
|
|
{ |
32
|
8761
|
|
|
|
|
11178
|
$self->{'y'} = shift; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
27465
|
|
|
|
|
43084
|
return $self->{'y'}; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub _to_s |
39
|
|
|
|
|
|
|
{ |
40
|
660
|
|
|
660
|
|
677
|
my $self = shift; |
41
|
|
|
|
|
|
|
|
42
|
660
|
|
|
|
|
771
|
return sprintf("%d,%d", $self->x, $self->y); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub _init |
46
|
|
|
|
|
|
|
{ |
47
|
8761
|
|
|
8761
|
|
12140
|
my ($self,$args) = @_; |
48
|
|
|
|
|
|
|
|
49
|
8761
|
|
|
|
|
16288
|
$self->x($args->{x}); |
50
|
8761
|
|
|
|
|
15632
|
$self->y($args->{'y'}); |
51
|
|
|
|
|
|
|
|
52
|
8761
|
|
|
|
|
12905
|
return; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub _equal |
56
|
|
|
|
|
|
|
{ |
57
|
625
|
|
|
625
|
|
712
|
my ($self,$other_xy) = @_; |
58
|
|
|
|
|
|
|
|
59
|
625
|
|
100
|
|
|
714
|
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__ |