| 1 | package Poker::Game::Courcheval; | ||||||||||
| 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 | |||||||||||
| 9 | =head1 NAME | ||||||||||
| 10 | |||||||||||
| 11 | Poker::Game::Courcheval - Courchevel (5-card Omaha high) | ||||||||||
| 12 | |||||||||||
| 13 | =head1 VERSION | ||||||||||
| 14 | |||||||||||
| 15 | Version 0.12 | ||||||||||
| 16 | |||||||||||
| 17 | =cut | ||||||||||
| 18 | |||||||||||
| 19 | |||||||||||
| 20 | =head1 SYNOPSIS | ||||||||||
| 21 | |||||||||||
| 22 | use Poker::Game::Courcheval; | ||||||||||
| 23 | |||||||||||
| 24 | my $game = Poker::Game::Courcheval->new; | ||||||||||
| 25 | my $hero = $game->deal_hole(['As','Kd','7c','2h','9s']); | ||||||||||
| 26 | $game->door('Ah'); # first board card (preflop) | ||||||||||
| 27 | $game->flop(['Kc','2d']); # two more -> 3 board cards | ||||||||||
| 28 | $game->turn('9c'); | ||||||||||
| 29 | $game->river('3s'); | ||||||||||
| 30 | $game->evaluate($hero); | ||||||||||
| 31 | |||||||||||
| 32 | =head1 DESCRIPTION | ||||||||||
| 33 | |||||||||||
| 34 | Courchevel: five hole cards, five community cards dealt as 1 + 2 + 1 + 1. | ||||||||||
| 35 | Hand construction is standard Omaha (exactly two hole + three board). | ||||||||||
| 36 | |||||||||||
| 37 | =cut | ||||||||||
| 38 | |||||||||||
| 39 | 1 | extends 'Poker::Game::Omaha5'; | |||||||||
| 40 | |||||||||||
| 41 | =head2 door | ||||||||||
| 42 | |||||||||||
| 43 | Deal the first community card (exposed preflop). | ||||||||||
| 44 | |||||||||||
| 45 | =cut | ||||||||||
| 46 | |||||||||||
| 47 | 1 | ▶ | sub door { | ||||||||
|
Subroutine
door: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 48 | 1 | my ( $self, $card ) = @_; | |||||||||
| 49 | 1 | ▶ | die "door requires an empty board" if @{ $self->board }; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 50 | 1 | return $self->_deal_street( 1, $card ); | |||||||||
| 51 | } | ||||||||||
| 52 | |||||||||||
| 53 | =head2 flop | ||||||||||
| 54 | |||||||||||
| 55 | In Courchevel the "flop" adds two cards after the door card | ||||||||||
| 56 | (board becomes three cards). | ||||||||||
| 57 | |||||||||||
| 58 | =cut | ||||||||||
| 59 | |||||||||||
| 60 | 1 | ▶ | around flop => sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.0
| |||||||||||
| 61 | 1 | my ( $orig, $self, $cards ) = @_; | |||||||||
| 62 | die "Courchevel flop requires exactly 1 door card on board" | ||||||||||
| 63 | 1 | ▶ | unless @{ $self->board } == 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 64 | 1 | return $self->_deal_street( 2, $cards ); | |||||||||
| 65 | 1 | }; | |||||||||
| 66 | |||||||||||
| 67 | 1 | 1; | |||||||||