first commit

This commit is contained in:
Jose Caban
2025-06-07 01:59:34 -04:00
commit 388ac241f0
3558 changed files with 9116289 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
public class GoodThreadBall {
/**the radius of the ball*/
public static final int BALL_RADIUS = 8;
/**the x location of the ball*/
private int xPos;
/**the y location of teh ball*/
private int yPos;
/**
* creates a new ball given the starting x and y position
*/
public GoodThreadBall (int xPos, int yPos) {
this.xPos = xPos;
this.yPos = yPos;
}
/**
* updates the the ball to move to the right
*/
public void update() {
this.xPos++;
if (xPos > 600) {
xPos = 0;
}
} //end update
/**
* gets the x location
*/
public int getXPos() {
return this.xPos;
}
/**
* gets the y location
*/
public int getYPos() {
return this.yPos;
}
} //end class good thread bal