| 1 | package Poker::Eval::HighSuit; | ||
| 2 | 1 | our $VERSION = '0.12'; | |
| 3 | |||
| 4 | |||
| 5 | 1 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | Poker::Eval::HighSuit - Calculate the highest card of a specific suit. | ||
| 10 | |||
| 11 | =head1 VERSION | ||
| 12 | |||
| 13 | Version 0.12 | ||
| 14 | |||
| 15 | =cut | ||
| 16 | |||
| 17 | |||
| 18 | |||
| 19 | =head1 INTRODUCTION | ||
| 20 | |||
| 21 | Useful in split-pot games like High Chicago where half the pot goes to the player with the highest Spade. | ||
| 22 | |||
| 23 | =cut | ||
| 24 | |||
| 25 | 1 | extends 'Poker::Eval'; | |
| 26 | |||
| 27 | 1 | has 'high_suit' => ( | |
| 28 | is => 'rw', | ||
| 29 | builder => '_build_high_suit', | ||
| 30 | ); | ||
| 31 | |||
| 32 | 0 | ▶ | sub _build_high_suit { # High Chicago |
|
Subroutine
_build_high_suit: not called CC=1 SCAR=6.9
| |||
| 33 | 0 | return 's'; | |
| 34 | } | ||
| 35 | |||
| 36 | 0 | ▶ | sub best_hand { |
|
Subroutine
best_hand: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 37 | 0 | my ( $self, $hole ) = @_; | |
| 38 | 0 | my $hand = Poker::Hand->new(cards => $hole); | |
| 39 | 0 | $hand->score($self->scorer->score($hole, $self->high_suit)); | |
| 40 | 0 | return $hand; | |
| 41 | } | ||
| 42 | |||
| 43 | =head1 AUTHOR | ||
| 44 | |||
| 45 | Nathaniel Graham, C<< <ngraham at cpan.org> >> | ||
| 46 | |||
| 47 | =head1 LICENSE AND COPYRIGHT | ||
| 48 | |||
| 49 | Copyright 2016 Nathaniel Graham. | ||
| 50 | |||
| 51 | This program is free software; you can redistribute it and/or modify it | ||
| 52 | under the terms of the the Artistic License (2.0). You may obtain a | ||
| 53 | copy of the full license at: | ||
| 54 | |||
| 55 | L<http://www.perlfoundation.org/artistic_license_2_0> | ||
| 56 | |||
| 57 | =cut | ||
| 58 | |||
| 59 | 1 | 1; | |