mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Forbedrer variabelnavn og kommentarer i Position
This commit is contained in:
parent
aed590f7bf
commit
81553f67d9
@ -1,33 +1,36 @@
|
|||||||
package inf112.fiasko.roborally.game;
|
package inf112.fiasko.roborally.game;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class represent a position on the board
|
||||||
|
*/
|
||||||
public class Position {
|
public class Position {
|
||||||
|
|
||||||
private int xPosition;
|
private int xCoordinate;
|
||||||
private int yPosition;
|
private int yCoordinate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* initalises the x and y cooardinats.
|
* Initializes the position
|
||||||
* @param xPosition sets the x position.
|
* @param xCoordinate The x coordinate of the position
|
||||||
* @param yPosition sets the y position.
|
* @param yCoordinate The y coordinate of the position
|
||||||
*/
|
*/
|
||||||
public Position(int xPosition, int yPosition) {
|
public Position(int xCoordinate, int yCoordinate) {
|
||||||
this.xPosition = xPosition;
|
this.xCoordinate = xCoordinate;
|
||||||
this.yPosition = yPosition;
|
this.yCoordinate = yCoordinate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets x coordinate of the position.
|
* Gets the x coordinate of the position
|
||||||
* @return the x coordinate of the position.
|
* @return The x coordinate of the position
|
||||||
*/
|
*/
|
||||||
public int getXCoordinate() {
|
public int getXCoordinate() {
|
||||||
return xPosition;
|
return xCoordinate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets y coordinate of the position.
|
* Gets the y coordinate of the position
|
||||||
* @return the y coordinate of the position.
|
* @return The y coordinate of the position
|
||||||
*/
|
*/
|
||||||
public int getYCoordinate() {
|
public int getYCoordinate() {
|
||||||
return yPosition;
|
return yCoordinate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user