Game/SevenCardStud.pm

filter: Statementstmt 100% 25 / 25 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 2 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 79.0% 34 / 43 CC 4 SCAR 9.8
CC
4
Cov
85%
__ANON__
4.7
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« Game/Razz.pm ↑ Summary Score/LowA5.pm »
1 package Poker::Game::SevenCardStud;
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::High;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 =head1 NAME
12  
13 Poker::Game::SevenCardStud - Seven-card stud (high)
14  
15 =head1 VERSION
16  
17 Version 0.12
18  
19 =cut
20  
21  
22 =head1 SYNOPSIS
23  
24 use Poker::Game::SevenCardStud;
25  
26 my $game = Poker::Game::SevenCardStud->new;
27 my $hero = Poker::Hand->new( cards => [] );
28 $game->third_street( $hero, ['As','Kd','7c'] );
29 $game->fourth_street( $hero, 'Ah' );
30 $game->fifth_street( $hero, 'Kc' );
31 $game->sixth_street( $hero, '2d' );
32 $game->seventh_street($hero, '9s' );
33 $game->evaluate($hero);
34  
35 =head1 DESCRIPTION
36  
37 Seven-card stud highball. Best five of seven; no community cards.
38  
39 =cut
40  
41 1 extends 'Poker::Game::Stud';
42  
43 3 ▶around BUILDARGS => sub {
Subroutine __ANON__: called CC=4 SCAR=15.5
44 3 my ( $orig, $class, @args ) = @_;
45 3 my $args = $class->$orig(@args);
46 3 ▶ $args = {} unless ref $args eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $args eq "HASH" 0 3 3
47 3 ▶ $args->{scorer} //= Poker::Score::High->new;
Condition33%1/3
$args->{"scorer"} //= "Poker::Score::High"->new
l!l&&r!l&&!r
030
MC/DC0%0/2
$args->{"scorer"} //= "Poker::Score::High"->new
$args->{"scorer"} "Poker::Score::High"->new
Truth table33%1/3
A //= B
A= $args->{"scorer"}B= "Poker::Score::High"->new
ABresult
1X1
011
000
48 $args->{eval_engine} //= Poker::Eval::Community->new(
49 scorer => $args->{scorer},
50 3 ▶ );
Condition33%1/3
$args->{"eval_engine"} //= "Poker::Eval::Community"->new("scorer", $args->{"scorer"})
l!l&&r!l&&!r
030
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
51 3 return $args;
52 1 };
53  
54 1 1;
« Game/Razz.pm ↑ Summary Score/LowA5.pm »