| 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
| |||||||||||||||||||||
| 47 | 3 | ▶ | $args->{scorer} //= Poker::Score::High->new; | ||||||||||||||||||
|
Condition33%1/3
$args->{"scorer"} //= "Poker::Score::High"->new
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
| |||||||||||||||||||||
| 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"})
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"})
| |||||||||||||||||||||
| 51 | 3 | return $args; | |||||||||||||||||||
| 52 | 1 | }; | |||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | 1 | 1; | |||||||||||||||||||