Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Poker module question

by frozenwithjoy (Curate)
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.


Comment on Re: Poker module question
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://981759]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2014-08-27 18:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (248 votes), past polls