Computer Science Canada Trivia Game Help Needed Please!! |
Author: | Yashar343 [ Wed Jan 15, 2014 1:47 am ] | ||
Post subject: | Trivia Game Help Needed Please!! | ||
I am trying to make a trivia game that for every question you get right 5 points will be added to your score and for every question you get wrong -5 points will be added. By the end of the game you will be given a bronze,silver, or gold metal based on # of points.? I can't seem to identify the correct answer of my multiple choice to say that if you have gotten the correct answer then +5 points and vice versa. I have tried to use label in a if statemet but that does not work. I am new in turing and any feedback would be great. ?
Turing 4.11 |
Author: | DemonWasp [ Wed Jan 15, 2014 8:31 am ] |
Post subject: | RE:Trivia Game Help Needed Please!! |
You already detect whether the answer is correct or not in your case-label statement. Why not either: 1) Add or subtract points there. 2) Mark a boolean value for "correct" or "not correct", which you can then refer to later? Also, you'll save a lot of time and effort if you learn about arrays and file input. You can represent a single question by the following: - a string for the question itself - several strings, one for each of the answers - an integer for the correct answer |
Author: | Yashar343 [ Wed Jan 15, 2014 8:41 am ] |
Post subject: | RE:Trivia Game Help Needed Please!! |
Im a sorry may you please give me an example of 1) adding or substracting points ? |
Author: | DemonWasp [ Wed Jan 15, 2014 8:59 am ] |
Post subject: | RE:Trivia Game Help Needed Please!! |
How are you storing the player's score / points? Just add or subtract 5 from that number. |