Game/LowA5SingleDraw.pm

filter: Statementstmt 100% 31 / 31 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 2 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 82.6% 43 / 52 CC 4 SCAR 8.1
CC
4
Cov
87%
__ANON__
4.7
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« Game/Low27TripleDraw.pm ↑ Summary Game/LowA5TripleDraw.pm »
1 package Poker::Game::LowA5SingleDraw;
2 1 our $VERSION = '0.12';
3  
4  
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Poker::Eval::Community;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Poker::Score::LowA5;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 =head1 NAME
12  
13 Poker::Game::LowA5SingleDraw - A-5 single draw
14  
15 =head1 VERSION
16  
17 Version 0.12
18  
19 =cut
20  
21  
22 1 extends 'Poker::Game';
23  
24 1 ▶has '+hole_count' => ( default => sub { 5 } );
Subroutine __ANON__: called CC=1 SCAR=0.0
25 1 ▶has '+board_size' => ( default => sub { 0 } );
Subroutine __ANON__: called CC=1 SCAR=0.0
26 1 ▶has '+max_draw_rounds' => ( default => sub { 1 } );
Subroutine __ANON__: called CC=1 SCAR=0.0
27  
28 1 ▶around BUILDARGS => sub {
Subroutine __ANON__: called CC=4 SCAR=15.5
29 1 my ( $orig, $class, @args ) = @_;
30 1 my $args = $class->$orig(@args);
31 1 ▶ $args = {} unless ref $args eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $args eq "HASH" 0 1 1
32 1 ▶ $args->{scorer} //= Poker::Score::LowA5->new;
Condition33%1/3
$args->{"scorer"} //= "Poker::Score::LowA5"->new
l!l&&r!l&&!r
010
MC/DC0%0/2
$args->{"scorer"} //= "Poker::Score::LowA5"->new
$args->{"scorer"} "Poker::Score::LowA5"->new
Truth table33%1/3
A //= B
A= $args->{"scorer"}B= "Poker::Score::LowA5"->new
ABresult
1X1
011
000
33 $args->{eval_engine} //= Poker::Eval::Community->new(
34 scorer => $args->{scorer},
35 1 ▶ );
Condition33%1/3
$args->{"eval_engine"} //= "Poker::Eval::Community"->new("scorer", $args->{"scorer"})
l!l&&r!l&&!r
010
MC/DC0%0/2
$args->{"eval_engine"} //= "Poker::Eval::Community"->new("scorer", $args->{"scorer"})
$args->{"eval_engine"} "Poker::Eval::Community"->new("scorer", $args->{"scorer"})
Truth table33%1/3
A //= B
A= $args->{"eval_engine"}B= "Poker::Eval::Community"->new("scorer", $args->{"scorer"})
ABresult
1X1
011
000
36 1 return $args;
37 1 };
38  
39 1 1;
« Game/Low27TripleDraw.pm ↑ Summary Game/LowA5TripleDraw.pm »