Game/Razz.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/FiveCardDrawJokersWild.pm ↑ Summary Game/SevenCardStud.pm »
1 package Poker::Game::Razz;
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::Razz - Razz (seven-card stud low A-5)
14  
15 =head1 VERSION
16  
17 Version 0.12
18  
19 =cut
20  
21  
22 =head1 SYNOPSIS
23  
24 use Poker::Game::Razz;
25  
26 my $game = Poker::Game::Razz->new;
27 my $hero = $game->deal_hole(['As','2d','3c','4h','5s','9c','Kd']);
28 $game->evaluate($hero);
29  
30 =head1 DESCRIPTION
31  
32 Razz: seven-card stud with A-5 lowball ranking (aces low; straights and
33 flushes do not count against the hand).
34  
35 =cut
36  
37 1 extends 'Poker::Game::Stud';
38  
39 1 ▶around BUILDARGS => sub {
Subroutine __ANON__: called CC=4 SCAR=15.5
40 1 my ( $orig, $class, @args ) = @_;
41 1 my $args = $class->$orig(@args);
42 1 ▶ $args = {} unless ref $args eq 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $args eq "HASH" 0 1 1
43 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
44 $args->{eval_engine} //= Poker::Eval::Community->new(
45 scorer => $args->{scorer},
46 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
47 1 return $args;
48 1 };
49  
50 1 1;
« Game/FiveCardDrawJokersWild.pm ↑ Summary Game/SevenCardStud.pm »