I'm writing a program to simulate the shuffling of a deck of cards. So far it works fine, with one problem -- repeat cards keep turning up. Is there any way to cut an arbitrary value out of an array? The code works like this:
while ($game_hand < 12) {I'd like a function that could cut whatever value $_ gets out of @deck completely, during the loop so I don't have to go through and check it for redundancy at a later point (and yes, I know about splice: for whatever reason, in this case it doesn't work and ends up giving me more repeat values... ugh).
In reply to removing arbitrary elements from an array? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |