Need help with code for school

int x;
int y;
int wx;
int wy;
int s = 0;

PImage sunf;
PImage bee;

void setup(){
size(1920,1080);
x = (int)random(200,1700);
y = (int)random(200, 800);
bee = loadImage(“bee.png”);
sunf = loadImage(“sunf.jpg”);
}

void draw(){
wx = x + 50;
wy = y + 20;
background(255);
image(sunf,x,y);
image(bee, mouseX, mouseY);
if(wx == mouseX && wx == mouseY){
x = (int)random(200,1700);
y = (int)random(200, 800);
s++;
textSize(32);
fill(0);
textAlign(RIGHT);
text(s, 1920,0);
}
}

I am trying to make a basic game in my digital technology class. I want it so when the mouse is over the sunflower(sunf) it moves to a new random location and adds 1 to a score counter in the top right and the is a bee following the mouse. when I run my code the sunflower shows on and the bee follows the mouse but when the mouse is over the sunflower nothing happens.

Hello,

Welcome!

Please format your code so we can read it easily and cut and paste it and run it:
https://discourse.processing.org/faq#format-your-code

There are a lot of resources here:
www.processing.org

:)

The second wx must be wy!

It’s hard to hit a spot exactly with the mouse.

Instead allow for a distance between sunf and mouse of 16 pixel or so

Eg if(dist(wx,wy, mouseX,mouseY) < 16)

Welcome to the forum! Please edit your post and format your code.

https://discourse.processing.org/faq#format-your-code