| 1 | package Games::ABC_Path::Solver::Coord; | ||||||||||||||||||||
| 2 | 8 | $Games::ABC_Path::Solver::Coord::VERSION = '0.6.2'; | |||||||||||||||||||
| 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 | sub y | ||||||||||||||||||||
| 26 | { | ||||||||||||||||||||
| 27 | 105339 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
y: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 105339 | ▶ | if (@_) | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 30 | { | ||||||||||||||||||||
| 31 | 33781 | $self->{'y'} = shift; | |||||||||||||||||||
| 32 | } | ||||||||||||||||||||
| 33 | |||||||||||||||||||||
| 34 | 105339 | return $self->{'y'}; | |||||||||||||||||||
| 35 | } | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | sub _to_s | ||||||||||||||||||||
| 38 | { | ||||||||||||||||||||
| 39 | 1980 | ▶ | my $self = shift; | ||||||||||||||||||
|
Subroutine
_to_s: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 1980 | return sprintf( "%d,%d", $self->x, $self->y ); | |||||||||||||||||||
| 42 | } | ||||||||||||||||||||
| 43 | |||||||||||||||||||||
| 44 | sub _init | ||||||||||||||||||||
| 45 | { | ||||||||||||||||||||
| 46 | 33781 | ▶ | my ( $self, $args ) = @_; | ||||||||||||||||||
|
Subroutine
_init: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | 33781 | $self->x( $args->{x} ); | |||||||||||||||||||
| 49 | 33781 | $self->y( $args->{'y'} ); | |||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | 33781 | return; | |||||||||||||||||||
| 52 | } | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | sub _equal | ||||||||||||||||||||
| 55 | { | ||||||||||||||||||||
| 56 | 1950 | ▶ | my ( $self, $other_xy ) = @_; | ||||||||||||||||||
|
Subroutine
_equal: called CC=2 SCAR=6.9
| |||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | 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
| |||||||||||||||||||||
| 59 | } | ||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | 8 | 1; # End of Games::ABC_Path::Solver::Base | |||||||||||||||||||
| 63 | |||||||||||||||||||||
| 64 | __END__ | ||||||||||||||||||||