in reply to Texas Hold'ems Poker Analysis Tool
This ugly fragment is repeated 6 times itself! If those are the only interesting elements in the arrays, try @winner=@hand_rank;.$winner[0] = $hand_rank[0]; $winner[1] = $hand_rank[1]; $winner[2] = $hand_rank[2]; $winner[3] = $hand_rank[3]; $winner[4] = $hand_rank[4]; $winner[5] = $hand_rank[5];
But, I wanted to point out the interesting:
Also, I think you would have more oppertunity for combining things if you declared the players as an array, not individual variables. E.g. the lines push (@p2_hand, pop @shuffled_deck); differ only in a digit.@winner[0..5]= @hand_rank[0..5];
—John
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Texas Hold'ems Poker Analysis Tool
by Elgon (Curate) on Sep 06, 2002 at 14:21 UTC | |
by John M. Dlugosz (Monsignor) on Sep 06, 2002 at 15:58 UTC |