Changes for version 0.04

  • =cut
  • our $VERSION = '0.04';
  • =head1 SYNOPSIS
  • This class is used internally by Poker::Eval. You probably don't want to use it directly.
  • =cut
  • =head1 ATTRIBUTES
  • =head2 cards
  • Array ref of Poker::Card objects.
  • =cut
  • has 'cards' => ( is => 'rw', isa => sub { die "Not an array ref" unless ref( $_[0] ) eq 'ARRAY' }, builder => '_build_cards', );
  • sub _build_cards { return []; }
  • =head2 best_combo
  • Best combination of cards (hole + community) according to rules of game.
  • =cut
  • has 'best_combo' => ( is => 'rw', isa => sub { die "Not an array ref" unless ref( $_[0] ) eq 'ARRAY' }, builder => '_build_best_combo', );
  • sub _build_best_combo { return []; }
  • has 'wins' => ( is => 'rw', default => sub { 0 }, );
  • =head2 score
  • Numerical score of best combination
  • =cut
  • has 'score' => ( is => 'rw', default => sub { 0 }, );
  • has 'temp_score' => ( is => 'rw', default => sub { 0 }, );
  • =head2 name
  • english name of best combination
  • =cut
  • has 'name' => ( is => 'rw', );
  • =head2 ev
  • Expected win rate of hand in given situation
  • =cut
  • has 'ev' => ( is => 'rw', default => sub { 0 }, );
  • sub flatten { my ( $self, $cards ) = @_; return join( '', map { $_->rank . $_->suit } @{$cards} ); }
  • =head2 cards_flat
  • hole cards in human-readable form
  • =cut
  • sub cards_flat { my $self = shift; return $self->flatten( $self->cards ); }
  • =head2 best_combo_flat
  • best combination of cards in human-readable form
  • =cut
  • sub best_combo_flat { my $self = shift; return $self->flatten( $self->best_combo ); }
  • =head1 AUTHOR
  • Nathaniel Graham, C<< <ngraham at cpan.org> >>
  • =head1 LICENSE AND COPYRIGHT
  • Copyright 2016 Nathaniel Graham.
  • This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at:
  • L<http://www.perlfoundation.org/artistic_license_2_0>
  • =cut
  • 1; ./Poker-Eval-0.04/lib/Poker/Dealer.pm0000644000175000017500000000574115030351036016140 0ustar broombroompackage Poker::Dealer; use strict; use warnings FATAL => 'all'; use Moo; use List::Util qw(shuffle); use Poker::Deck; use Storable qw(dclone);
  • =head1 NAME
  • Poker::Dealer - Simple class to represent a poker dealer
  • =head1 VERSION

Modules

Simple class to represent a poker card.
Simple class to represent a poker dealer
Simple class to represent a deck of poker cards.
Deal, score, and calculate expected win rates of poker hands. Base class for specific game types.
Evaluate and score Badugi poker hands.
Evaluate and score Badeucy poker hands.
Evaluate and score hole cards in the game of Black Mariah.
Evaluate and score Chinese poker hands.
Evaluate and score hand using any combination of hole and community cards.
Calculate the highest card of a specific suit.
Evaluate and score Omaha poker hands.
Evaluate and score wildcard poker hands.
Simple class to represent a poker hand.
Identify and score specific poker hands. Base class for specific scoring systems.
Identify and score specific Badugi poker hand.
Scoring system used in the game of Badeucy.
Scoring system used in highball Stud to decide which player starts the action.
Scoring system used in lowball Stud to decide which player starts the action.
Scoring system used in highball Stud with wildcards to decide which player starts the action.
Identify and score Chinese poker hand.
Identify and score specific highball poker hand.
Score highest card of a specific suit.
Identify and score lowball 2-7 poker hand.
Identify and score lowball 8 or better poker hand.
Identify and score lowball A-5 poker hand.