# HG changeset patch # User Jeremy Gow # Date 1352807170 0 # Node ID 84d943797cf2fc3d7147729b6ded8f29541e2e54 # Parent 4574bad8122775c5082aba3cf6362b0ad9949bf9 Require rating for each melody diff -r 4574bad81227 -r 84d943797cf2 Block.class Binary file Block.class has changed diff -r 4574bad81227 -r 84d943797cf2 ExperimentController.class Binary file ExperimentController.class has changed diff -r 4574bad81227 -r 84d943797cf2 ExperimentController.java --- a/ExperimentController.java Tue Nov 13 11:45:12 2012 +0000 +++ b/ExperimentController.java Tue Nov 13 11:46:10 2012 +0000 @@ -106,9 +106,16 @@ // else // reportError("You have already played the melody."); } else if (source == sp.getNextButton()) { - if (!exp.hasRun() || exp.isRunning()) + if (!exp.hasRun() || exp.isRunning()) { + //System.out.println(!exp.hasRun()); + //System.out.println(exp.isRunning()); + //System.out.println(exp.getCurrentBlock().getMidiPlayer().getSequencer().isRunning()); reportError("You haven't finished playing the melody yet."); - else if (sp.unansweredQuestions()) + + } else if (exp.getCurrentBlock().getMelodyResults().countResponses() == 0) { + reportError("Please select a number."); + + } else if (sp.unansweredQuestions()) reportError("There are unanswered questions."); else { // store results (and write to file) diff -r 4574bad81227 -r 84d943797cf2 ExperimentGui$1.class Binary file ExperimentGui$1.class has changed diff -r 4574bad81227 -r 84d943797cf2 ExperimentGui.class Binary file ExperimentGui.class has changed diff -r 4574bad81227 -r 84d943797cf2 MelodyResults$1.class Binary file MelodyResults$1.class has changed diff -r 4574bad81227 -r 84d943797cf2 MelodyResults.class Binary file MelodyResults.class has changed diff -r 4574bad81227 -r 84d943797cf2 MelodyResults.java --- a/MelodyResults.java Tue Nov 13 11:45:12 2012 +0000 +++ b/MelodyResults.java Tue Nov 13 11:46:10 2012 +0000 @@ -63,6 +63,11 @@ responseTimes.add(t); } + public int countResponses() { + return responses.size(); + } + + /* add question */ public void addQuestion(String question) { questions.add(question);