Created
April 21, 2012 17:30
-
-
Save lilyszajn/2438618 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
| void checkSection1() { | |
| if (key == 'a' || key == 'A' || key == 'b' || key == 'B' || key == 'c' || key == 'C' || key == 'd' || key == 'D' || key == 'e' || key == 'E') { | |
| answers.add("" + key); | |
| answerCounter++; //add to the answer counter | |
| if (answers.size() > 0) { | |
| String q1 = (String)answers.get(answerCounter); | |
| println("answer counter" + answerCounter); | |
| println(answers + "key" + key); | |
| } | |
| //if the answer counter has reached max, then load step 6 (step 4 in AIMS) | |
| if (answerCounter == 4) { | |
| println("answer counter should be 4" + answerCounter); | |
| checkSection1 = false; | |
| checkSection2 = true; | |
| //String q1 = (String)answers.get(0); | |
| String q2 = (String)answers.get(0); | |
| String q3 = (String)answers.get(1); | |
| String q4 = (String)answers.get(2); | |
| String q5 = (String)answers.get(3); | |
| String[] csv = new String[1]; | |
| csv[0] = q2 + "," + q3 + "," + q4 + "," + q5; | |
| println(d.toString()); | |
| saveStrings("Test" + d + ".txt", csv); //save all answers into a text file | |
| println("ANSWERS SAVED!"); | |
| } | |
| }//key pressed | |
| }//end check section 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment