mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-01-31 23:29:36 +01:00
Legger til manglende mellomrom for bedre kodestil
This commit is contained in:
parent
b5eae63892
commit
a2dc09f48c
@ -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};
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user