Legger til manglende mellomrom for bedre kodestil

This commit is contained in:
Kristian Knarvik 2020-04-16 15:33:31 +02:00
parent b5eae63892
commit a2dc09f48c
3 changed files with 12 additions and 12 deletions

View File

@ -206,17 +206,17 @@ public class BoardActiveScreen extends AbstractScreen implements InputProcessor
int cameraUpX = Math.round(camera.up.x);
int cameraUpY = Math.round(camera.up.y);
if (cameraUpX == 0 && Math.round(camera.up.y) == 1) {
outX = (int)-x;
outY = (int)y;
outX = (int) -x;
outY = (int) y;
} else if (cameraUpX == 0 && cameraUpY == -1) {
outX = (int)x;
outY = (int)-y;
outX = (int) x;
outY = (int) -y;
} else if (cameraUpX == -1 && cameraUpY == 0) {
outX = (int)-y;
outY = (int)-x;
outX = (int) -y;
outY = (int) -x;
} else if (cameraUpX == 1 && cameraUpY == 0) {
outX = (int)y;
outY = (int)x;
outX = (int) y;
outY = (int) x;
}
return new int[]{outX, outY};
}

View File

@ -174,7 +174,7 @@ public class Board {
* sets the damage taken of robots in powerdown to 0
*/
public void executePowerdown() {
for (Robot robot:robots.values()) {
for (Robot robot : robots.values()) {
if (robot.isInPowerDown()) {
robot.setDamageTaken(0);
}
@ -655,7 +655,7 @@ public class Board {
Direction laserDirection = Direction.getReverseDirection(wallLaser.getElement().getDirection());
List<Position> laserTargets = new ArrayList<>();
getLaserTarget(laserDirection, wallLaser.getPosition(), laserTargets);
Position hitPosition = laserTargets.get(laserTargets.size()-1);
Position hitPosition = laserTargets.get(laserTargets.size() - 1);
WallType laserType = wallLaser.getElement().getWallType();
updateLaserDisplay(laserTargets, laserDirection, laserType);
if (getRobotOnPosition(hitPosition) != null) {
@ -675,7 +675,7 @@ public class Board {
}
List<Position> laserTargets = new ArrayList<>();
getLaserTarget(robotDirection, positionInFront, laserTargets);
Position hitPosition = laserTargets.get(laserTargets.size()-1);
Position hitPosition = laserTargets.get(laserTargets.size() - 1);
WallType laserType = WallType.WALL_LASER_SINGLE;
updateLaserDisplay(laserTargets, robotDirection, laserType);
if (getRobotOnPosition(hitPosition) != null) {

View File

@ -580,7 +580,7 @@ public class RoboRallyGame implements IRoboRallyGame {
* Checks all flags for robots. Tries to update the flag of the robot.
*/
private void checkAllFlags() {
for (BoardElementContainer<Tile> flag:flags) {
for (BoardElementContainer<Tile> flag : flags) {
Position flagPosition = flag.getPosition();
if (gameBoard.hasRobotOnPosition(flagPosition)) {
RobotID robotID = gameBoard.getRobotOnPosition(flagPosition);