diff options
Diffstat (limited to 'src/main/java/fr')
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/block/JBoxBlock.java | 2 | ||||
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/block/RobotBlock.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/block/JBoxBlock.java b/src/main/java/fr/umlv/java/wallj/block/JBoxBlock.java index 48edbdc..06ecca3 100644 --- a/src/main/java/fr/umlv/java/wallj/block/JBoxBlock.java +++ b/src/main/java/fr/umlv/java/wallj/block/JBoxBlock.java | |||
@@ -23,7 +23,7 @@ public abstract class JBoxBlock extends Block { | |||
23 | @Override | 23 | @Override |
24 | public Vec2 getPos() { | 24 | public Vec2 getPos() { |
25 | if (body == null) throw new IllegalStateException("Uninitialised block."); | 25 | if (body == null) throw new IllegalStateException("Uninitialised block."); |
26 | return body.getPosition().clone(); | 26 | return new Vec2(body.getPosition()); |
27 | } | 27 | } |
28 | 28 | ||
29 | @Override | 29 | @Override |
diff --git a/src/main/java/fr/umlv/java/wallj/block/RobotBlock.java b/src/main/java/fr/umlv/java/wallj/block/RobotBlock.java index 065f367..45c75da 100644 --- a/src/main/java/fr/umlv/java/wallj/block/RobotBlock.java +++ b/src/main/java/fr/umlv/java/wallj/block/RobotBlock.java | |||
@@ -29,7 +29,7 @@ public class RobotBlock extends Block { | |||
29 | 29 | ||
30 | @Override | 30 | @Override |
31 | public Vec2 getPos() { | 31 | public Vec2 getPos() { |
32 | return pos.clone(); | 32 | return new Vec2(pos); |
33 | } | 33 | } |
34 | 34 | ||
35 | @Override | 35 | @Override |