lib/Game/HeroesVsAliens/Cell.pm

filter: Statementstmt 61.5% 8 / 13 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 25.0% 1 / 4 Podpod 0.0% 0 / 1 totaltotal 31.0% 9 / 29 CC 4 SCAR 25.0
CC
4
Cov
38%
draw
20.0
__ANON__
2.0
__ANON__
2.0
CRAP 12.1
« lib/Game/HeroesVsAliens/Projectile.pm ↑ Summary lib/Game/HeroesVsAliens/Role/Projectile.pm »
1 package Game::HeroesVsAliens::Cell;
2  
3 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 has x => (
6 is => 'rw'
7 );
8  
9 1 has y => (
10 is => 'rw'
11 );
12  
13 has width => (
14 is => 'rw',
15 0 ▶ default => sub { 100 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
16 1 );
17  
18 has height => (
19 is => 'rw',
20 0 ▶ default => sub { 100 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
21 1 );
22  
23 sub draw {
24 0 ▶ my ($self, $app) = @_;
Subroutine draw: not called CC=4 SCAR=30.0
Pod undocumented
25 0 ▶ if ($app->mouse->x && $app->mouse->y && $app->collision($self, $app->mouse)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($app->mouse->x and $app->mouse->y and $app->collision($self, $app->mouse)) 0 0 0
Condition0%0/6
$app->mouse->x and $app->mouse->y and $app->collision($self, $app->mouse)
!ll&&!rl&&r
000
$app->mouse->x and $app->mouse->y
!ll&&!rl&&r
000
MC/DC0%0/3
$app->mouse->x and $app->mouse->y and $app->collision($self, $app->mouse)
$app->mouse->x $app->mouse->y $app->collision($self, $app->mouse)
Truth table0%0/4
A and B and C
A= $app->mouse->xB= $app->mouse->yC= $app->collision($self, $app->mouse)
ABCresult
0XX0
10X0
1100
1111
26 0 $app->draw_outline_rect($self->x, $self->y, $self->width, $self->height, 200, 200, 200, 255);
27 }
28 }
29  
30 1 1;
« lib/Game/HeroesVsAliens/Projectile.pm ↑ Summary lib/Game/HeroesVsAliens/Role/Projectile.pm »