diff options
author | pacien | 2018-01-12 01:14:07 +0100 |
---|---|---|
committer | pacien | 2018-01-12 01:14:07 +0100 |
commit | 52a87e1d9ffb0b1a0ed45e3af71b0ccc9c05142a (patch) | |
tree | 8dd8bfbc5f8c65863f2b2f91c879210cf6c5d950 /src/main/java/fr | |
parent | 1890fd2b56c40b6a2b73ac9e1cc58511ec0c0ad2 (diff) | |
download | wallj-52a87e1d9ffb0b1a0ed45e3af71b0ccc9c05142a.tar.gz |
Revert "Implement equality check"
This reverts commit 09b631e
Signed-off-by: pacien <pacien.trangirard@pacien.net>
Diffstat (limited to 'src/main/java/fr')
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/model/Block.java | 15 | ||||
-rw-r--r-- | src/main/java/fr/umlv/java/wallj/model/BombBlock.java | 17 |
2 files changed, 0 insertions, 32 deletions
diff --git a/src/main/java/fr/umlv/java/wallj/model/Block.java b/src/main/java/fr/umlv/java/wallj/model/Block.java index 25265d1..7f32087 100644 --- a/src/main/java/fr/umlv/java/wallj/model/Block.java +++ b/src/main/java/fr/umlv/java/wallj/model/Block.java | |||
@@ -72,19 +72,4 @@ public abstract class Block { | |||
72 | .collect(Collectors.toList()); | 72 | .collect(Collectors.toList()); |
73 | } | 73 | } |
74 | 74 | ||
75 | @Override | ||
76 | public boolean equals(Object o) { | ||
77 | if (this == o) return true; | ||
78 | if (!(o instanceof Block)) return false; | ||
79 | Block block = (Block) o; | ||
80 | return type == block.type && | ||
81 | Objects.equals(controllers, block.controllers) && | ||
82 | Objects.equals(pos, block.pos); | ||
83 | } | ||
84 | |||
85 | @Override | ||
86 | public int hashCode() { | ||
87 | return Objects.hash(type, controllers, pos); | ||
88 | } | ||
89 | |||
90 | } | 75 | } |
diff --git a/src/main/java/fr/umlv/java/wallj/model/BombBlock.java b/src/main/java/fr/umlv/java/wallj/model/BombBlock.java index 4eca843..9ba4a68 100644 --- a/src/main/java/fr/umlv/java/wallj/model/BombBlock.java +++ b/src/main/java/fr/umlv/java/wallj/model/BombBlock.java | |||
@@ -2,8 +2,6 @@ package fr.umlv.java.wallj.model; | |||
2 | 2 | ||
3 | import org.jbox2d.common.Vec2; | 3 | import org.jbox2d.common.Vec2; |
4 | 4 | ||
5 | import java.util.Objects; | ||
6 | |||
7 | /** | 5 | /** |
8 | * A bomb block. | 6 | * A bomb block. |
9 | * | 7 | * |
@@ -27,19 +25,4 @@ public class BombBlock extends Block { | |||
27 | return timer; | 25 | return timer; |
28 | } | 26 | } |
29 | 27 | ||
30 | @Override | ||
31 | public boolean equals(Object o) { | ||
32 | if (this == o) return true; | ||
33 | if (!(o instanceof BombBlock)) return false; | ||
34 | if (!super.equals(o)) return false; | ||
35 | BombBlock bombBlock = (BombBlock) o; | ||
36 | return timer == bombBlock.timer && | ||
37 | super.equals(o); | ||
38 | } | ||
39 | |||
40 | @Override | ||
41 | public int hashCode() { | ||
42 | return Objects.hash(super.hashCode(), timer); | ||
43 | } | ||
44 | |||
45 | } | 28 | } |