| 1 | package Games::ABC_Path::Solver::Coord; | ||||||||||||||||||||
| 2 | 8 | $Games::ABC_Path::Solver::Coord::VERSION = '0.6.1'; | |||||||||||||||||||
| 3 | 8 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 8 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 8 | ▶ | use parent 'Games::ABC_Path::Solver::Base'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 8 | ▶ | use integer; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | sub x | ||||||||||||||||||||
| 13 | { | ||||||||||||||||||||
| 14 | 108459 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
x: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 108459 | ▶ | if (@_) | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 17 | { | ||||||||||||||||||||
| 18 | 33781 | $self->{x} = shift; | |||||||||||||||||||
| 19 | } | ||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 108459 | return $self->{x}; | |||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | |||||||||||||||||||||
| 26 | sub y | ||||||||||||||||||||
| 27 | { | ||||||||||||||||||||
| 28 | 105339 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
y: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 105339 | ▶ | if (@_) | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 31 | { | ||||||||||||||||||||
| 32 | 33781 | $self->{'y'} = shift; | |||||||||||||||||||
| 33 | } | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 105339 | return $self->{'y'}; | |||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | sub _to_s | ||||||||||||||||||||
| 39 | { | ||||||||||||||||||||
| 40 | 1980 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
_to_s: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 1980 | return sprintf("%d,%d", $self->x, $self->y); | |||||||||||||||||||
| 43 | } | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | sub _init | ||||||||||||||||||||
| 46 | { | ||||||||||||||||||||
| 47 | 33781 | ▶ | my ($self,$args) = @_; | ||||||||||||||||||
|
Subroutine
_init: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 33781 | $self->x($args->{x}); | |||||||||||||||||||
| 50 | 33781 | $self->y($args->{'y'}); | |||||||||||||||||||
| 51 | |||||||||||||||||||||
| 52 | 33781 | return; | |||||||||||||||||||
| 53 | } | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | sub _equal | ||||||||||||||||||||
| 56 | { | ||||||||||||||||||||
| 57 | 1950 | ▶ | my ($self,$other_xy) = @_; | ||||||||||||||||||
|
Subroutine
_equal: called CC=2 SCAR=6.9
| |||||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | 1950 | ▶ | return (($self->x == $other_xy->x) && ($self->y == $other_xy->y)); | ||||||||||||||||||
|
Condition100%3/3
$self->x == $other_xy->x && $self->y == $other_xy->y
MC/DC100%2/2
$self->x == $other_xy->x && $self->y == $other_xy->y
$self->x == $other_xy->x
$self->y == $other_xy->y
Truth table100%3/3
A && B
A= $self->x == $other_xy->xB= $self->y == $other_xy->y
| |||||||||||||||||||||
| 60 | } | ||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | 8 | 1; # End of Games::ABC_Path::Solver::Base | |||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | __END__ | ||||||||||||||||||||