class Person { int x = 0; int y = 0; int mortality = 100; boolean move = true; float z = 0; int index; int health = 0; int seed = int(random(200)); boolean quarantinePeople = false; Person(int X,int Y){ x = X; y = Y; } /* The conditions for health are as follows, 0 = healthy, 1 = sick, 2 = dead. */ void Draw(){ if(health == 0){ stroke(2); fill(255); // image(myPerson, x, y); ellipse(x,y,13,13);//The healthy are white and fat circles. } else if(health == 1){ stroke(1); fill(0,255,0); // image(redPerson, x, y); ellipse(x,y,10,10);//The sick are green and emaciated. They also move slower } else{ move = false; fill(211,9,9); // image(deadPerson, x, y); ellipse(x,y,8,8);//the dead are red and immobile. } //QUARANTINE BOTTOM RIGHT CORNER if ((mouseX > 400) && (mouseX < 800) && (mouseY > 300 ) && (mouseY < 600)){ // this basically says "if up is pressed, do the following (play //radar left to right) for(int I = 0;I 400 && People[I].x < 800 && People[I].y > 300 && People[I].y < 600) { quarantinePeople=true; noFill(); strokeWeight(3); stroke(255); rect(400, 300, 399, 299); fill(255); textSize(35); text("QUARANTINED", 460, 450); People[I].move = false; } } } } } //QUARANTINE TOP RIGHT CORNER if ((mouseX > 400) && (mouseX < 800) && (mouseY > 0 ) && (mouseY < 300)){ // this basically says "if up is pressed, do the following (play //radar left to right) for(int I = 0;I 400 && People[I].x < 800 && People[I].y > 0 && People[I].y < 300) { quarantinePeople=true; noFill(); strokeWeight(3); stroke(255); rect(400, 1, 399, 299); fill(255); textSize(35); text("QUARANTINED", 450, 150); People[I].move = false; } } } } } //QUARANTINE TOP LEFT CORNER if ((mouseX > 0) && (mouseX < 400) && (mouseY > 0 ) && (mouseY < 300)){ // this basically says "if up is pressed, do the following (play //radar left to right) for(int I = 0;I 0 && People[I].x < 400 && People[I].y > 0 && People[I].y < 300) { quarantinePeople=true; noFill(); strokeWeight(3); stroke(255); rect(1, 1, 399, 299); fill(255); textSize(35); text("QUARANTINED", 140, 150); People[I].move = false; } } } } } //QUARANTINE BOTTOM LEFT CORNER if ((mouseX > 0) && (mouseX < 400) && (mouseY > 300 ) && (mouseY < 600)){ // this basically says "if up is pressed, do the following (play //radar left to right) for(int I = 0;I 0 && People[I].x < 400 && People[I].y > 300 && People[I].y < 600) { quarantinePeople=true; noFill(); strokeWeight(3); stroke(255); rect(1, 300, 399, 299); fill(255); textSize(35); text("QUARANTINED", 50, 450); People[I].move = false; } } } } } } void Move(){ if(move == true){ noiseSeed(seed); x+=int(noise(z)*20-10); y+=int(noise(z-200)*20-10); z+=.1; } } void checkHit(){//This is collision detction, the sick will transmit the disease by touch. for(int J = 0;J