Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int level;
- String fq = "What is the largest continent?";
- String sq = "Where is Bulgaria?";
- String tq = "What is the biggst country in the world?";
- String foq = "What is the longest river on earth?";
- String fiq = "How many oceans are in the world?";
- String siq = "What is the smallest counry in the world?";
- String seq = "What is the most spoken language?";
- String eq = "What is the capital of Bilgaria?";
- String nq = "How Many States Are There In The US";
- String teq = "What is the Biggest Ocean?";
- int score = 0;
- void setup() {
- size(700, 600);
- }
- void draw() {
- switch(level) {
- case 0:
- case 1:
- level1();
- break;
- case 2:
- level2();
- break;
- case 3:
- level3();
- break;
- case 4:
- level4();
- break;
- case 5:
- level5();
- break;
- case 6:
- level6();
- break;
- case 7:
- level7();
- break;
- case 8:
- level8();
- break;
- case 9:
- level9();
- break;
- case 10:
- level10();
- break;
- case 11:
- end();
- break;
- }
- }
- void level1() {
- background(#22E3DE);
- fill(0);
- textSize(40);
- text(fq, 50, 50);
- textSize(50);
- text("Asia", 120, 250);
- noFill();
- rect(50, 205, 260, 57);
- textSize(50);
- text("Europe", 430, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(50);
- text("Africa", 100, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(50);
- text("Australia", 400, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX > 50 && mouseX <260 && mouseY >205 && mouseY<262 && mousePressed) {
- score=1;
- level=2;
- }
- }
- void level2() {
- background(#22E3DE);
- textSize(40);
- text(sq, 50, 50);
- textSize(30);
- fill(0);
- text("In North America", 60, 250);
- noFill();
- rect(50, 205, 260, 57);
- textSize(30);
- text(" In Europe", 430, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(30);
- text("In Africa", 100, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(30);
- text("In Antarctica", 400, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX >395 && mouseX <635 && mouseY >205 && mouseY<262 && mousePressed) {
- score=2;
- level=3;
- }
- }
- void level3() {
- background(#22E3DE);
- background(#22E3DE);
- textSize(30);
- fill(0);
- text(tq, 50, 50);
- textSize(50);
- text("Poland", 120, 250);
- noFill();
- rect(50, 205, 260, 57);
- textSize(50);
- text("China", 430, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(50);
- text("India", 100, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(50);
- text("Russia", 400, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX > 395 && mouseX <635 && mouseY >355 && mouseY<402 && mousePressed) {
- score=3;
- level=4;
- }
- }
- void level4() {
- background(#22E3DE);
- textSize(30);
- text(foq, 50, 50);
- fill(0);
- textSize(50);
- text("Danube", 110, 250);
- noFill();
- rect(50, 205, 260, 57);
- textSize(50);
- text("Amazon", 420, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(50);
- text("Nile", 100, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(50);
- text("Congo", 400, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX > 50 && mouseX <410 && mouseY >355 && mouseY<402 && mousePressed) {
- score=4;
- level=5;
- }
- }
- void level5() {
- background(#22E3DE);
- textSize(35);
- text(fiq, 25, 50);
- textSize(40);
- fill(0);
- text("Eight", 60, 254);
- noFill();
- rect(50, 205, 260, 57);
- textSize(60);
- text(" Five", 430, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(60);
- text("Seven", 100, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(60);
- text("Four", 400, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX >395 && mouseX <635 && mouseY >205 && mouseY<262 && mousePressed) {
- score=5;
- level=6;
- }
- }
- void level6() {
- background(#22E3DE);
- fill(0);
- textSize(40);
- text(siq, 30, 50);
- fill(0);
- textSize(40);
- text("Vatican City", 120, 250);
- noFill();
- rect(50, 205, 260, 57);
- textSize(50);
- text("Serbia", 430, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(50);
- text("Monaco", 100, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(50);
- text("San Marino", 400, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX > 50 && mouseX <260 && mouseY >205 && mouseY<262 && mousePressed) {
- score=6;
- level=7;
- }
- }
- void level7() {
- background(#22E3DE);
- fill(0);
- textSize(40);
- text(seq, 50, 50);
- fill(0);
- textSize(50);
- text("Spanish", 120, 250);
- noFill();
- rect(50, 205, 260, 57);
- textSize(50);
- text("German", 430, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(50);
- text("English", 100, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(50);
- text("Mandarin", 400, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX > 395 && mouseX <635 && mouseY >355 && mouseY<402 && mousePressed) {
- score=7;
- level=8;
- }
- }
- void level8() {
- background(#22E3DE);
- fill(0);
- textSize(35);
- text(eq, 25, 50);
- fill(0);
- textSize(60);
- text("Plovdiv", 60, 250);
- noFill();
- rect(50, 205, 260, 57);
- textSize(60);
- text("Sofia", 430, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(60);
- text("Varna", 100, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(60);
- text("Pravets", 400, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX >395 && mouseX <635 && mouseY >205 && mouseY<262 && mousePressed) {
- score=8;
- level=9;
- }
- }
- void level9() {
- background(#22E3DE);
- fill(0);
- textSize(40);
- text(nq, 50, 50);
- fill(0);
- textSize(50);
- text("55", 120, 250);
- noFill();
- rect(50, 205, 260, 57);
- textSize(50);
- text("46", 430, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(50);
- text("50", 100, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(50);
- text("39", 400, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX > 50 && mouseX <410 && mouseY >355 && mouseY<402 && mousePressed) {
- score=9;
- level=10;
- }
- }
- void level10() {
- background(#22E3DE);
- fill(0);
- textSize(30);
- text(teq, 50, 50);
- textSize(20);
- text("The Pacific Ocean", 100, 250);
- noFill();
- rect(50, 205, 260, 57);
- textSize(20);
- text("The Atlantic Ocean", 410, 250);
- noFill();
- rect(395, 205, 230, 57);
- textSize(20);
- text("The Indian Ocean", 90, 400);
- noFill();
- rect(50, 355, 260, 57);
- textSize(20);
- text("The Southern Ocean", 390, 400);
- noFill();
- rect(395, 355, 230, 57);
- text(score, 650, 480);
- if (mouseX > 50 && mouseX <260 && mouseY >205 && mouseY<262 && mousePressed) {
- score=10;
- level=11;
- }
- }
- void end() {
- background(#22E3DE);
- text("Congratulations!", 200, 250);
- textSize(40);
- fill(0);
- text("You reached the end of the quizz.", 25, 290);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement