Bytter en == med .equals()

This commit is contained in:
Kristian Knarvik 2020-04-25 14:52:13 +02:00
parent f29121619a
commit fcbbc83da6

View File

@ -907,7 +907,7 @@ public class Board {
newDirection = laserDirection; newDirection = laserDirection;
} }
//If using the existing direction and the beams are perpendicular, the direction needs to be rotated //If using the existing direction and the beams are perpendicular, the direction needs to be rotated
if (newDirection == existingDirection && if (newDirection.equals(existingDirection) &&
Direction.arePerpendicular(laserDirection, existingDirection)) { Direction.arePerpendicular(laserDirection, existingDirection)) {
newDirection = Direction.getLeftRotatedDirection(newDirection); newDirection = Direction.getLeftRotatedDirection(newDirection);
} }