Como o que a Marina disse estava certo, tive que fazer do jeito que a Marina disse: fiz um código respectivo para cada bolinha, o que quase triplicou o tamanho do meu código em 1 hora e 23 minutos de trabalho. Com o tempo, passei a usar menos indicativos do que era cada coisa, pois fui me habituando com a linguagem do Processing, mas segui usando isso nos títulos para ter um controle das datas que criei e do período de ajustes entre um trabalho e outro.
//Tabuleiro de Go Que Muda de Cor Individualmente - 20/05/2026, 17:52
int branco = 255;
int preto = 0;
void setup() { //Início das coisas que não se mexem
background (255);
size (500, 500);
stroke (0);
strokeWeight(1);
line(width/2, 0, 250, 500);
line(0, height/2, 500, 250);
line (width/4, 0, 125, 500);
line (0, height/4, 500, 125);
line (width/2+width/4, 0, 375, 500);
line (0, height/2+height/4, 500, 375);
}
void draw() {
fill (branco);
ellipse(width/2, height/4, 10, 10);
ellipse (width/4, height/2, 10, 10);
ellipse (width/2, height/2+height/4, 10, 10);
ellipse (width/2+width/4, height/2, 10, 10);
fill (preto);
ellipse (width/2, height/2, 10, 10);
ellipse (width/4, height/4, 10, 10);
ellipse (width/4, height/4+height/2, 10, 10);
ellipse (width/2+width/4, height/4, 10, 10);
ellipse (width/2+width/4, height/4+height/2, 10, 10);
if (mousePressed == true) {
if (mouseX>245 && mouseX<255 && mouseY>120 && mouseY<130) {
fill(preto);
} else {
fill(branco);
}
ellipse(width/2, height/4, 10, 10);
}
if (mousePressed == true) {
if (mouseX>120 && mouseX<130 && mouseY>245 && mouseY<255) {
fill(preto);
} else {
fill(branco);
}
ellipse(width/4, height/2, 10, 10);
}
if (mousePressed == true) {
if (mouseX>245 && mouseX<255 && mouseY>370 && mouseY<380) {
fill(preto);
} else {
fill(branco);
}
ellipse(width/2, height/2+height/4, 10, 10);
}
if (mousePressed == true) {
if (mouseX>370 && mouseX<380 && mouseY>245 && mouseY<255) {
fill(preto);
} else {
fill(branco);
}
ellipse(width/2+width/4, height/2, 10, 10);
}
if (mousePressed == true) {
if (mouseX>245 && mouseX<255 && mouseY>245 && mouseY<255) {
fill(branco);
} else {
fill(preto);
}
ellipse(width/2, height/2, 10, 10);
}
if (mousePressed == true) {
if (mouseX>120 && mouseX<130 && mouseY>120 && mouseY<130) {
fill(branco);
} else {
fill(preto);
}
ellipse(width/4, height/4, 10, 10);
}
if (mousePressed == true) {
if (mouseX>120 && mouseX<130 && mouseY>370 && mouseY<380) {
fill(branco);
} else {
fill(preto);
}
ellipse(width/4, height/4+height/2, 10, 10);
}
if (mousePressed == true) {
if (mouseX>370 && mouseX<380 && mouseY>120 && mouseY<130) {
fill(branco);
} else {
fill(preto);
}
ellipse(width/2+width/4, height/4, 10, 10);
}
if (mousePressed == true) {
if (mouseX>370 && mouseX<380 && mouseY>370 && mouseY<380) {
fill(branco);
} else {
fill(preto);
}
ellipse(width/2+width/4, height/4+height/2, 10, 10);
}
}







