so im trying to make a code for a school project where the german empire flag turns into the german flag when i drag on it.
until the second ellipse(mouseX,mouseY,50,50); part, everything works fine, but in the if(200 <= mouseY <= 300){ part, instead of coloring the ellipses 255,206,0 , it colors the ellipses. 221,0,0 .
pls help
function setup(){
createCanvas(500,300);
frameRate(30);
noStroke();
fill(0,0,0)
rect(0,0,500,100)
fill(255,255,255);
rect(0,100,500,100);
fill(222,0,0);
rect(0,200,500,100);
}
function draw(){
if(mouseIsPressed == true){
if(mouseY < 100){
fill(0,0,0);
ellipse(mouseX,mouseY,50,50);
}else{
if(100 <= mouseY <= 200){
fill(221,0,0);
ellipse(mouseX,mouseY,50,50);
}else{
if(200 <= mouseY <= 300);{
fill(255,206,0);
ellipse(mouseX,mouseY,50,50);
}
}
}}
}