txt = '1';
def setup():
size(600,600)
noFill()
noStroke()
def draw():
fill('#FF0000') # red quadrant
rect(width/2,0, width/2,height/2)
fill('#004477') # blue quadrant
rect(0,0, width/2,height/2)
fill('#6633FF') # violet quadrant
rect(0,height/2, width/2,height/2)
fill('#FF9900') # orange quadrant
rect(width/2,height/2, width/2,height/2)
fill(255)
if mouseX < width/2 and mouseY < height/2:
#text("BLUE",mouseX,mouseY)
txt = 'BLUE'
if mouseX < width/2 and mouseY > height/2:
#text("PURPLE",mouseX,mouseY)
txt = 'PURPLE'
if mouseX > width/2 and mouseY < height/2:
#text("RED",mouseX,mouseY)
txt = 'RED'
if mouseX > width/2 and mouseY > height/2:
#text("YELLOW",mouseX,mouseY)
txt = 'YELLOW'
text(txt,mouseX,mouseY)
I don’t know why but after some time the program just crashes