Add failing test for static mode class defintion.

This commit is contained in:
A Samuel Pottinger
2022-11-12 17:29:20 +00:00
parent 9b19e4add9
commit 9ea128cc21
3 changed files with 71 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
class Button {
int x, y, radius;
public Button (int x, int y, int radius) {
this.x = x;
this.y = y;
this.radius = radius;
}
boolean over() {
return dist(mouseX, mouseY, this.x, this.y) < this.radius;
}
void draw() {
ellipse(this.x, this.y, this.radius * 2, this.radius * 2);
}
}