createCanvas(windowWidth, windowHeight);
backgroundPic = loadImage("background.jpg");
backgroundPic.resize(windowWidth, windowHeight);
start = loadSound("start.wav");
play = loadSound("play.wav");
click = loadSound("click.wav");
expert = loadSound("expert.wav");
posX = random(windowWidth/8, windowWidth-(windowWidth/8));
posY = random(windowHeight/8, windowHeight-(windowHeight/8));
rect(windowWidth/2, windowHeight/2, windowWidth, windowHeight);
fill(255, 255, 255, introA);
text("Move your mouse and try to find Jaraxxus, who is hiding.", windowWidth/2,windowHeight/4);
fill(255, 255, 255, introA);
text("Please turn on your sound and click to play when ready.", windowWidth/2,windowHeight/3);
fill(255, 255, 255, introA);
text("Expert mode removes the hand cursor.", windowWidth/2, windowHeight/2.4);
text("Score:"+ score, (width/10), height/7);
text("Expert Mode", (width/10), height/11);
if (expertMode == false) {
rect(windowWidth/4.8, windowHeight/13, 30, 30);
ellipse(posX, posY, 50, 50);
image(backgroundPic, 0, 0, windowWidth, windowHeight);
if ((mouseX <= posX+windowWidth/2) && (mouseX >= posX-windowWidth/2) && (mouseY <= posY+windowHeight/2) && (mouseY >= posY-windowHeight/2)) {
if ((mouseX <= posX+windowWidth/3) && (mouseX >= posX-windowWidth/3) && (mouseY <= posY+windowHeight/3) && (mouseY >= posY-windowHeight/3)) {
if ((mouseX <= posX+windowWidth/8) && (mouseX >= posX-windowWidth/8) && (mouseY <= posY+windowHeight/8) && (mouseY >= posY-windowHeight/8)) {
if ((mouseX <= posX+windowWidth/10) && (mouseX >= posX-windowWidth/10) && (mouseY <= posY+windowHeight/10) && (mouseY >= posY-windowHeight/10)) {
if ((mouseX <= posX+30) && (mouseX >= posX-30) && (mouseY <= posY+30) && (mouseY >= posY-30)) {
if (start.isPlaying() == false && play.isPlaying() == false && click.isPlaying() == false && expert.isPlaying() == false && introA == 0) {
if ((mouseX <= posX+20) && (mouseX >= posX-25) && (mouseY <= posY+25) && (mouseY >= posY-25)) {
if ((mouseX <= windowWidth/4.8+15) && (mouseX >= windowWidth/4.8-15) && (mouseY <= windowHeight/13+15) && (mouseY >= windowHeight/13-15)) {
if (over == true && expertMode == false || overE == true) {
if (over == true && mouseIsPressed == true) {
posX = random(windowWidth/8, windowWidth-(windowWidth/8));
posY = random(windowHeight/8, windowHeight-(windowHeight/8));
if (expertMode == true) {
function mouseClicked() {
if ((mouseX <= windowWidth/4.8+15) && (mouseX >= windowWidth/4.8-15) && (mouseY <= windowHeight/13+15) && (mouseY >= windowHeight/13-15)) {