-
Notifications
You must be signed in to change notification settings - Fork 0
/
Brainlet.pde
54 lines (43 loc) · 1.39 KB
/
Brainlet.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// TITLE: Brainlet //<>//
// DESCRIPTION: A software program that allows users to test their geography/biology knowledge by answering questions
// PROGRAMMERS: Nadia Anwar, Eric Bao, Soham Tyagi
// DATE: May 23, 2023
import g4p_controls.*;
Questions easyQ, moderateQ, hardQ, questionSet;
String[] easyFile, moderateFile, hardFile;
String[] splitQuestion;
String[] options;
String answer, question;
String windowName;
String subSelected; // Selected subject
int randomness = 4; // How "random" the questions are
int numOfTries = 1; // Initial number of tries
int lvl; // Difficulty level
int current = 0; // Current question
int correct = 0; // Number of correct answers
int attempts;
int numOfQuestions;
int answerLocation = 0;
int buttonClicked;
boolean sliderChanged = false;
boolean answerSelected = false;
PImage mainMenu, questionScreen, endingScreen ;
// CHANGEABLE VALUES
String mode = "Test"; // Possible options: Test, Endless
ArrayList<String> optionsArray = new ArrayList<String>();
ArrayList<String> pastQuestions = new ArrayList<String>();
//<>//
void setup() { //<>//
size(800, 500);
// Load background images
mainMenu = loadImage("background.jpg");
questionScreen = loadImage("startquiz.jpg");
endingScreen = loadImage("endingImage.jpg");
//<>//
createGUI(); //<>//
mainMenu();
}
void draw() {
// Display the other screens //<>//
displayScreen(); //<>//
} //<>//