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 { public class Position {
private int xCoordinate; private final int xCoordinate;
private int yCoordinate; private final int yCoordinate;
/** /**
* Initializes the position * Initializes the position

View File

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

View File

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

View File

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