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

Username:   Password: 
 RegisterRegister   
 Need help asking random questions in a trivia game.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jays13




PostPosted: Mon Jun 01, 2009 3:10 pm   Post subject: Need help asking random questions in a trivia game.

I'm making a trivia-style game and don't know how to pick a random question to ask. I think I can do this by having a file with a bunch of questions in it and randomly asking them, but I'm not sure...

Any help would be appreciated Very Happy
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Mon Jun 01, 2009 3:21 pm   Post subject: RE:Need help asking random questions in a trivia game.

You can load all the questions into an object or record type array and swap them with random indices within the bounds of the array and then play it through normally.
jays13




PostPosted: Mon Jun 01, 2009 3:24 pm   Post subject: Re: RE:Need help asking random questions in a trivia game.

Euphoracle @ Mon Jun 01, 2009 3:21 pm wrote:
You can load all the questions into an object or record type array and swap them with random indices within the bounds of the array and then play it through normally.



Is there a link where I can learn about these things?
Dusk Eagle




PostPosted: Mon Jun 01, 2009 3:36 pm   Post subject: Re: Need help asking random questions in a trivia game.

Check out The Turing Walkthrough. You can find everything you'll need to do this there.
jays13




PostPosted: Mon Jun 01, 2009 3:45 pm   Post subject: RE:Need help asking random questions in a trivia game.

I've spent hours already reading the walkthrough before I made an account and can't seem to understand what to do...
DemonWasp




PostPosted: Mon Jun 01, 2009 3:49 pm   Post subject: RE:Need help asking random questions in a trivia game.

Read about Records and Types and think about it. You won't find instructions on how to make a quiz-type game, however.
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  [ 6 Posts ]
Jump to:   


Style:  
Search: