Legger til final på variabler som ikke endres

This commit is contained in:
Kristian Knarvik 2020-02-20 14:10:56 +01:00
parent 29b48c1a87
commit 210cf8dcaf
4 changed files with 7 additions and 7 deletions

View File

@ -5,8 +5,8 @@ package inf112.fiasko.roborally.element_properties;
*/
public class Position {
private int xCoordinate;
private int yCoordinate;
private final int xCoordinate;
private final int yCoordinate;
/**
* Initializes the position

View File

@ -7,8 +7,8 @@ import inf112.fiasko.roborally.element_properties.GameTexture;
*/
public class DrawableObject implements IDrawableObject {
private final GameTexture texture;
private int xPos;
private int yPos;
private final int xPos;
private final int yPos;
private int width = 64;
private int height = 64;
private int rotation = 0;

View File

@ -7,7 +7,7 @@ import inf112.fiasko.roborally.element_properties.Position;
*/
public class Robot {
private int robotDamageTaken = 0;
private int playerId; //might not be needed
private final int playerId; //might not be needed
private boolean inPowerDown = false;
private int lastFlagVisited = 0;
private Position backupPosition;

View File

@ -8,8 +8,8 @@ import inf112.fiasko.roborally.element_properties.WallType;
*/
public class Wall {
private WallType wallType;
private Direction direction;
private final WallType wallType;
private final Direction direction;
/**
* Initializes a wall