PangZero/EarthquakeBall.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 3 totaltotal 0.0% 0 / 36 CC 3 SCAR 14.6
CC
3
Cov
0%
CountEarthquakeBalls
6.0
Bounce
6.0
new
2.0
CRAP 4.3
1 ##########################################################################
2 package Games::PangZero::EarthquakeBall;
3 ##########################################################################
4  
5 @ISA = qw(Games::PangZero::Ball);
6 use strict;
7 use warnings;
8  
9 sub new {
10 my $class = shift;
11 my $self = Games::PangZero::Ball->new(@_);
12 bless $self, $class;
13 }
14  
15 sub CountEarthquakeBalls {
16 my $count = 0;
17  
18 foreach my $ball (@Games::PangZero::GameObjects) {
19 if (ref($ball) eq 'Games::PangZero::EarthquakeBall') { ++$count; }
20 }
21 return $count;
22 }
23  
24 sub Bounce {
25 my $self = shift;
26  
27 unless ($Games::PangZero::GameEvents{earthquake} and $Games::PangZero::GameEvents{earthquake} > $self->{desc}->{quake}) {
28 $Games::PangZero::GameEvents{earthquake} = [$self->{desc}->{quake}, $self->{x}];
29 }
30 }
31  
32 1;