Forked from anonymous/gist:d09bfd8665cbbf5d7133d731ab788e02
Last active
August 2, 2016 02:17
-
-
Save euwbah/ce0e4db6c7febf141a31b1b6c75c0bf2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void takeQuiz() { | |
for( Question qtn : questions) { | |
QtnOutcome outcome = qtn.displayQuestion(); | |
while (true) { | |
if(outcome == QtnOutcome.CORRECT) { | |
AudioClip right = new AudioClip("file:///C://Users/coolm/Documents/NetBeansProjects/Question/Music/jawsofdeath.wav"); | |
right.play(1.0); | |
GUIHelper.show("CORRECT"); | |
score += 5; | |
break; | |
} else if (outcome == QtnOutcome.WARNING) { | |
AudioClip leavenoblanks = new AudioClip("file:///C://Users/coolm/Documents/NetBeansProjects/Question/Music/forget.wav"); | |
leavenoblanks.play(1.0); | |
GUIHelper.show("Pls, no blanks and do not put in any other word or number besides 1 to 4! I'm watching you"); | |
} else if(outcome == QtnOutcome.WRONG) { | |
AudioClip mistake = new AudioClip("file:///C://Users/coolm/Documents/NetBeansProjects/Question/Music/fail.wav"); | |
mistake.play(1.0); | |
GUIHelper.show("Unfortunately, you are wrong " +qtn.ans+ "."); | |
score -= 5; | |
break; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment