Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hi Lexicon,

Interesting stuff - I wish I'd searched PM before I started in on this! Although I probably would have written my version anyway as I have really improved my Perl over the past week or so.

One of the things that I noticed was that you can use a lot of cheats rather than look for the exact hand (mine only work for five cards though) - for example, if a unique list of the card values has only two elements then it must be either a full house or a four-of-a-kind. This reduces by a long way the amount of work to be done. I've also realised that I can rank the hand using the standard gt, lt and eq operators because of the way I set out how the hand's score is formatted.

The version I'm working on at the moment uses an object oriented (something I'm trying to get a handle on) interface to handle the card-related functions: Shuffling, dealing, flopping, turn, river and who wins. I've also added a sethand function so that it can be used for basic statistical analyses. The next thing for me to write is an overlying game & betting manager so that it can be used as the basis for some kind of AI Poker competition or game.

Thanks, Elgon

"What this book tells me is that goose-stepping morons, such as yourself, should read books instead of burning them."
       - Dr. Jones Snr, Indiana Jones and the Last Crusade


In reply to Re: Re: Pattern Matching Query by Elgon
in thread Pattern Matching Query by Elgon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-16 07:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found