| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Poker::Eval::BlackMariah; |
|
2
|
1
|
|
|
1
|
|
650
|
use Moo; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
3
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Poker::Eval::BlackMariah - Evaluate and score hole cards in the game of Black Mariah. |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 VERSION |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Version 0.03 |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 INTRODUCTION |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
"BlackMariah" typically refers to the Queen of Spades. Half the pot goes to the player holding black mariah at the end of the game. |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
See Poker::Eval for example code. |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=cut |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
extends 'Poker::Eval'; |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has 'bitch_card' => ( |
|
30
|
|
|
|
|
|
|
is => 'rw', |
|
31
|
|
|
|
|
|
|
builder => '_build_bitch_card', |
|
32
|
|
|
|
|
|
|
); |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub _build_bitch_card { # The Bitch |
|
35
|
0
|
|
|
0
|
|
|
return 'Qs'; |
|
36
|
|
|
|
|
|
|
} |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub best_hand { |
|
39
|
0
|
|
|
0
|
1
|
|
my ( $self, $hole ) = @_; |
|
40
|
0
|
|
|
|
|
|
my $hand = Poker::Hand->new(cards => $hole); |
|
41
|
0
|
|
|
|
|
|
for my $card (@$hole) { |
|
42
|
0
|
0
|
|
|
|
|
if ($card->rank . $card->suit eq $self->bitch_card) { |
|
43
|
0
|
|
|
|
|
|
$hand->score(100); |
|
44
|
0
|
|
|
|
|
|
return $hand; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
} |
|
47
|
0
|
|
|
|
|
|
return $hand; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHOR |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
Nathaniel Graham, C<< >> |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Copyright 2016 Nathaniel Graham. |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
|
59
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
|
60
|
|
|
|
|
|
|
copy of the full license at: |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
L |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |