in reply to finding and deleting an element from array
The usual way is to do Fisher-Yates shuffle on @cards and deal from the top with pop.
If you wish to pull from a deck with rand, splice is nice.
After Compline,
Zaxo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: finding and deleting an element from array
by bart (Canon) on Sep 05, 2003 at 17:54 UTC | |
Re: Re: finding and deleting an element from array
by skaba9 (Beadle) on Sep 05, 2003 at 15:09 UTC |