BlackJack/Player/ExamplePlayer1.pm untested

filter: Statementstmt 0.0% 0 / 8 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 14 CC 2 SCAR 13.9
CC
2
Cov
0%
decide_simple
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 4.0
1 package Games::Tournament::BlackJack::Player::ExamplePlayer1;
2 # (very simple) example player module for blackjack
3 # this player will hit on a 16 or less.
4  
5 use Games::Tournament::BlackJack::Player;
6 use Games::Tournament::BlackJack::Utilities;
7 @ISA = qw(Games::Tournament::BlackJack::Player);
8  
9 # decide_simple returns "hit", "stand", or true for hit, false for stand.
10 sub decide_simple {
11 return handValue($_[0]->{'hand'}) <= 16 ? 'hit' : 'stand';
12 } # hit on 16 or less
13  
14  
15 1;