Even with the Case break system, my quiz was still falling through. I decided to change the command that progressed the quiz to a mouse click. This way I wouldn’t have to use the keyPressed to show the highlight and then progress the quiz. Instead I could have the highlight show on the mouse hover and progress on the click. This would also reduce the amount of user errors from selecting the wrong answer.
This however, didn’t stop my quiz from falling through. I still needed to use the delay function to stop it doing this. At least now, though I could display the highlight. Since before when both were controlled by the same key and I couldn’t use the delay to separate the highlight from the progression.
Above is how my structure works currently. I have used images as placeholders for the gifs. As it stands the gifs are shown all at the same time, in a grid. Originally I was just going to show them in sequence but now this is making me reconsider, especially since the sequence will vary in length depending on the answers the user gives. Also, if the output is visible all at once, this reduces the required viewing time, meaning that the content will do better on social media.