Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 randomizing pictures
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Steel




PostPosted: Thu Jan 18, 2007 11:09 pm   Post subject: randomizing pictures

i have a slot machine game, and the numbers 1, 2, 3 pop up. How would i make random pictures pop up instead of these numbers

ex 1 = picture of lucky seven
2 = cherry
3 = gold bar

thx
Sponsor
Sponsor
Sponsor
sponsor
rdrake




PostPosted: Fri Jan 19, 2007 8:10 am   Post subject: RE:randomizing pictures

Uh... create an array of images, then randomly select a numer, using that minus 1 to choose the correct image in the array.
bugzpodder




PostPosted: Fri Jan 19, 2007 9:41 am   Post subject: Re: randomizing pictures

if a cherry has the same probability as a lucky 7, then all casinos would go broke
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: