Hey all,
Been trying to do this for ages and after much research and trying to find a way of doing it. Basically, I’m making a quiz game, sounds simple enough? I thought it was…
So, my question is, how do I generate a random question, with one correct answer to that question and 3 wrong answers relating to that question. I did have my own way, which was having 3 very long lists and constantly doing .Add(“No, you’re wrong”) or whatever. But to me, that sounds like an awful way of doing things. I’ve tried using Arrays but found out they are only available in Java, and I prefer C# so I ended up trying to find a way to do it.
Now, through the research, I found that someone said “Create a string array that holds multiple strings and always have the correct answer as the first element” so that’s what I tried setting out to do…
I’ve tried creating a class to hold all data of 3 different string values, didn’t work.
I’ve tried .AddRage, worked, but ended up saying there were 6 elements in the list when there should have been only two (That’s what I wanted it to say) when I did it like this…
stringList.InsertRange (stringList.Count, new string[]{"One", "Two", "Three"});
stringList.InsertRange (stringList.Count, new string[]{"Four", "Five", "Six"});
So, to put it simply, is there an easy way of creating a quiz game with one question, four choices, and three being wrong?