Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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 surveying the Monastery: (11)
As of 2014-12-26 06:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (167 votes), past polls