line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Poker::Eval::Bitch; |
2
|
1
|
|
|
1
|
|
1724
|
use Moo; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Poker::Eval::Bitch - Evaluate and score hole cards in the game of Bitch. |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Version 0.01 |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=cut |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 INTRODUCTION |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
"The Bitch" typically refers to the Queen of Spades. Half the pot goes to the player holding the bitch at the end of the game. It's a poker game, folks, so don't get all politically correct on me. |
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
|
|
|
my ( $self, $hole ) = @_; |
40
|
0
|
|
|
|
|
|
for my $card (@$hole) { |
41
|
0
|
0
|
|
|
|
|
if ($card->rank . $card->suit eq $self->bitch_card) { |
42
|
0
|
|
|
|
|
|
return { score => 100, hand => $self->bitch_card }; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
} |
45
|
0
|
|
|
|
|
|
return { score => 0 }; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 AUTHOR |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Nathaniel Graham, C<< >> |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
Copyright 2016 Nathaniel Graham. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
57
|
|
|
|
|
|
|
under the terms of the the Artistic License (2.0). You may obtain a |
58
|
|
|
|
|
|
|
copy of the full license at: |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
L |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |