-
-
Save technoAl/f69d84708acb2e0cc6a70b347f4c3641 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Player { | |
private int x, y, width, height; | |
private int score = 0, velocityY = 0; | |
public Player(int x, int y, int width, int height){ | |
this.x = x; | |
this.y = y; | |
this.width = width; | |
this.height = height; | |
} | |
public void increaseScore(){ | |
score++; | |
} | |
public int getX() { | |
return x; | |
} | |
public void setX(int x) { | |
this.x = x; | |
} | |
public int getY() { | |
return y; | |
} | |
public void setY(int y) { | |
this.y = y; | |
} | |
public int getWidth() { | |
return width; | |
} | |
public void setWidth(int width) { | |
this.width = width; | |
} | |
public int getHeight() { | |
return height; | |
} | |
public void setHeight(int height) { | |
this.height = height; | |
} | |
public int getScore() { | |
return score; | |
} | |
public void setScore(int score) { | |
this.score = score; | |
} | |
public int getVelocityY() { | |
return velocityY; | |
} | |
public void setVelocityY(int velocityY) { | |
this.velocityY = velocityY; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment