From fcbbc83da667af6b7ec9f7a2c7865f72300fa4ea Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Sat, 25 Apr 2020 14:52:13 +0200 Subject: [PATCH] Bytter en == med .equals() --- src/main/java/inf112/fiasko/roborally/objects/Board.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/inf112/fiasko/roborally/objects/Board.java b/src/main/java/inf112/fiasko/roborally/objects/Board.java index fd02c80..7bed15b 100644 --- a/src/main/java/inf112/fiasko/roborally/objects/Board.java +++ b/src/main/java/inf112/fiasko/roborally/objects/Board.java @@ -907,7 +907,7 @@ public class Board { newDirection = laserDirection; } //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)) { newDirection = Direction.getLeftRotatedDirection(newDirection); }