CodingTrain / CodingTrain/Suggestion-Box

If, Else If, Else Is this good for a bigginer?

Open
#551 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
570
Forks
85
PR merge metrics
No merged PRs in 30d

Description

is this code _good_ for the exercise?
BTW **Awesome videos!** Keep it up man!

void draw() {
background(200);
//sectors
if (mouseX < 320 && mouseY > 180) {
fill(255, 0 , 0);
rect(0, 180, 320, 180);
} else if(mouseX < 320 && mouseY < 180) {
fill(0, 0, 255);
rect(0, 0, 320, 180);
} else if (mouseX > 320 && mouseY > 180) {
fill(0, 255, 0);
rect(320, 180, 320, 180);
} else {
fill(255, 255,0);
rect(320, 0, 320, 180);
}

//lines
stroke(0, 0, 0);
line(320, 0, 320, height);
line(0, 180, 640, 180);
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.