Computer Science Canada Help with...Lifelines in who wants to be..game |
Author: | McTam [ Mon Jan 17, 2005 1:28 pm ] |
Post subject: | Help with...Lifelines in who wants to be..game |
I can not figure out how to write the lifelines for my who wants to be a millionaire game....i have come a long way with the help of people from our beloved comp sci and it would be a shame if i couldn't figure this out so i can finish my program.... Can anyone help me with this part of my game? fifty fifty-cancel two out of four answers for the question ask the audience-since there is no audience....same as fifty fifty... call a friend-give the answer for the question Thanks guys.....I owe you HUGE! |
Author: | Tony [ Mon Jan 17, 2005 1:33 pm ] |
Post subject: | |
well you have your list of possible choices. Now to do 50-50, you just create a new list of choices - 2 elements only. First add the correct answer. Then randomly pick another answer. Let the user chose from those two. As for ask the audience - it is essensially the same, though I suggest also randomly generating some statistics. With a correct answer having a higher chance ofcourse ![]() |
Author: | McTam [ Mon Jan 17, 2005 1:37 pm ] |
Post subject: | who wants to be a millionaire lifelines |
That sounds great! and the response time....astonishing....but.... ![]() I can not write that in code is that a bother to ask for you to express yourself in computer language? ![]() ![]() |
Author: | Tony [ Mon Jan 17, 2005 5:14 pm ] | ||||||
Post subject: | |||||||
I'm not sure how your questions are set up... lets assume the following
so we have an array full of answers and we know that 2nd one is correct.. aka choice(answerIndex) now lets say we want to let the user pick just 2 of the above (after using 50-50)
and now you're ready! let the user pick between answer # myChoice(1) or myChoice(2).. you might want to keep track of the other two answers that will be crossed out, though those can be figured out since they are not in the list.
hope that helps |
Author: | McTam [ Tue Jan 18, 2005 11:36 am ] |
Post subject: | Thanks |
Thanks alot you have helped me a great deal... All the best to you...until next time ![]() |