Forbedrer variabelnavn og kommentarer i Position

This commit is contained in:
Kristian Knarvik 2020-02-18 16:53:57 +01:00
parent aed590f7bf
commit 81553f67d9

View File

@ -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;
} }
} }