| 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
Condition0%0/6
$app->mouse->x and $app->mouse->y and $app->collision($self, $app->mouse)
$app->mouse->x and $app->mouse->y
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)
| |||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | $app->draw_outline_rect($self->x, $self->y, $self->width, $self->height, 200, 200, 200, 255); | |||||||||||||||||||||||||||||||||||||||||
| 27 | } | ||||||||||||||||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||
| 30 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||