in reply to Poker problem

No thanks, I know what you're talking about, but it's easier this way. It's just finding Prwin values from handranges I KNOW the opponents play, give them a hand at random and remove it from the other player's hand range. It has to work this way, because I'm using a modedule Games:Poker, that works with hand names.

Replies are listed 'Best First'.
Re^2: Poker problem
by zentara (Cardinal) on Dec 02, 2008 at 14:58 UTC
    If you absolutely need to do it that way, you will need to save a record of all hands dealt. Setup a hash, with keys like game_number, hand_number, etc, and store it all. Then you can reclaim it at will. Setting up your deeply nested hash structure, so it works well with the module you are using may take some ingenuity on your part. You probably want to feed a sub, the game number, player, hand number, and get back an array ref. You may even need to use a db, to prevent your hash from consuming too much memory.

    I'm not really a human, but I play one on earth Remember How Lucky You Are