The Daily Click ::. Forums ::. Klik Coding Help ::. Elimination
 

Post Reply  Post Oekaki 
 

Posted By Message

Fish20



Registered
  03/12/2007
Points
  263

VIP MemberPS3 OwnerI like Aliens!I'm a Storm TrooperIt's-a me, Mario!I am an April FoolPicture Me This Round 48 Winner!
7th February, 2008 at 19:04:06 -

In card games the computer picks a random card. How could u make it so that when it randomly picks a number it destroys it and can't be used again?

 
All your base are in another castle, take this.

Dustin Gunn

Gnarly Tubular Way Cool Awesome Groovy Mondo

Registered
  15/12/2004
Points
  2659

Game of the Week WinnerKlikCast StarVIP MemberI'm on a BoatGOTW Winner Oct 2010Kliktober Special Award Tag
7th February, 2008 at 20:46:23 -

I think the magicdeque object does exactly that, but I've never used it

 
n/a

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
7th February, 2008 at 21:05:59 -

store ones that have already been used and keep generating a random one till it is one that hasn't been used yet

 
n/a

~Zigzag~



Registered
  13/03/2007
Points
  292

Game of the Week WinnerSilverNova Member
9th February, 2008 at 20:35:34 -

This is like identical to the other topic... Including the reply...

 
http://www.SilverNova.co.uk

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
9th February, 2008 at 20:39:29 -

i know. its such a simple thing to do too.

 
n/a

Fifth

Quadruped

Registered
  07/05/2003
Points
  5815

VIP MemberGOTW JULY 2010 WINNER!Kliktober Special Award TagGOTW HALLOWEEN 2011 WINNERPicture Me This Round 51 Winner!
9th February, 2008 at 20:58:53 -

You could also use a list object.
Fill it up with the values you need, then generate a random number based on the number of lines in the list, retrieve the appropriate value, and remove the line from the list.
It's handy for the fact that the lines will automatically compress to not leave any holes.

 
Go Moon!

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
9th February, 2008 at 21:33:36 -

but then youd need a way to load all the values back into the list if you wanna shuffle all the cards and start over. also if you save all values somewhere (like an array) you can remember where all the cards are in the deck at any time. which would probably be a better way of shuffling cards. randomly fill the list with numbers without repeating any numbers and then youd have a truly shuffled deck.

 
n/a

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
9th February, 2008 at 21:38:55 -

Unless you figure out the seed, which people usually leave as -1

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath
   

Post Reply



 



Advertisement

Worth A Click