Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Poker module question

by frozenwithjoy (Priest)
on Jul 14, 2012 at 04:23 UTC ( #981759=note: print w/replies, xml ) Need Help??


in reply to Poker module question

It seems that you need to pass ScoreHand() an array of your hand. The following worked for me (assuming the correct score of your sample hand is 6405):
my $userinput = <STDIN>; #As,Qc,Td,6c,3h chomp $userinput; my @hand = split /,/, $userinput; my $score = ScoreHand(@hand); say $score; #6405

edit: you can also pass it what the module refers to as a ShortHand. This seems to be a string containing all the cards in your hand, but appears to give errors very easily.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://981759]
help
Chatterbox?
and one hand claps...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2017-09-25 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (282 votes). Check out past polls.

    Notices?