1
0
Fork 0
uni_informatik_projekt/src/break_out/model/Position.java

69 lines
1014 B
Java
Raw Normal View History

2019-11-19 00:55:13 +00:00
package break_out.model;
/**
* This class represents a position within the board in pixel coordinates
2019-12-01 17:31:50 +00:00
*
2019-11-19 00:55:13 +00:00
* @author dmlux
*/
public class Position {
/**
* X coordinate
*/
private double x;
/**
* Y coordinate
*/
private double y;
2019-12-01 17:31:50 +00:00
2019-11-19 00:55:13 +00:00
/**
* The constructor needs a x and y coordinate to be called
2019-12-01 17:31:50 +00:00
*
2019-11-19 00:55:13 +00:00
* @param x The x position of the object on the board
* @param y The y position of the object on the board
*/
public Position(double x, double y) {
this.x = x;
this.y = y;
}
/**
* Getter for the x-coordinate
2019-12-01 17:31:50 +00:00
*
2019-11-19 00:55:13 +00:00
* @return x The x value of this position
*/
public double getX() {
return x;
}
/**
* Setter for the x-coordinate
2019-12-01 17:31:50 +00:00
*
2019-11-19 00:55:13 +00:00
* @param x The new x-coordinate
*/
public void setX(double x) {
this.x = x;
}
/**
* Getter for y-coordinate
2019-12-01 17:31:50 +00:00
*
2019-11-19 00:55:13 +00:00
* @return y The y value of the position
*/
public double getY() {
return y;
}
/**
* Setter for the y-coordinate
2019-12-01 17:31:50 +00:00
*
2019-11-19 00:55:13 +00:00
* @param y The new y-coordinate
*/
public void setY(double y) {
this.y = y;
}
2019-12-01 17:31:50 +00:00
2019-11-19 00:55:13 +00:00
}