# Random choose correct and wrong answer and push it to text.

Hello!

My name is Jan and me and some other guys are working on a school project. We are making a kind of Flappy Bird game with two holes in the pipes. But we have a problem. We have an array with correct answer and an array with wrong answers. The arrays are in order by index. So if we choose the correct answer with index 1, we get the corresponding wrong answer with index 1. When we choose those answers, we want them to be written on the screen: in the upper gap of the pipe and in the lower gap of the pipe. But we want it to be random. So that the correct answer is sometimes in the upper gap and in the lower gap. And the same with the wrong answer. When it is chosen, we need to write it on the screen.

Another problem we get with this is checking if the answer is correct. We now have a function that checks if the bird is flying through the upper gap. When it does, the answer is true. But when it’s random, the correct could be in the lower gap aswell.

We have been trying for over 4 hours now. You guys are the only option know. Could someone help us out?

``````// The Arrays (Level Script)
rightAnswers = new List<string>{"Nee", "Cyber beveiligers", "Gebruikersnaam", "Ja", "Een lang wachtwoord", "Persoon blokkeren", "Bericht rapporteren", "Niet delen van gevoelige informatie", "Nee"};
wrongAnswers = new List<string>{"Ja", "Hackers", "Foto's", "Nee", "Een wachtwoord tekens", "Persoon negeren", "Nare reactie plaatsen", "Zelf gaan pesten", "Ja"};

// Checking for answer (Level Script)
for (int i = 0; i < middlePipeList.Count; i++) {
MiddlePipe middlePipe = middlePipeList[i];
if (middlePipe.GetXPosition() > 0 && middlePipe.GetXPosition() < 0.2 && isWaitingAnswer == false) {
} else {
}
}

for (int i = 0; i < rightAnswers.Count; i++)
{
}
}

for (int i = 0; i < wrongAnswers.Count; i++)
{
}
}

// Pushing it to the TextWindows Script (Level Script)
}

}

// Writing it to the screen (TextWindow Script)
private void Bird_Answers(object sender, System.EventArgs e) {