diff options
-rw-r--r-- | src/ch/epfl/xblast/Cell.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ch/epfl/xblast/Cell.java b/src/ch/epfl/xblast/Cell.java index c5fbad8..7673f4f 100644 --- a/src/ch/epfl/xblast/Cell.java +++ b/src/ch/epfl/xblast/Cell.java | |||
@@ -178,7 +178,8 @@ public final class Cell { | |||
178 | */ | 178 | */ |
179 | @Override | 179 | @Override |
180 | public boolean equals(Object that) { | 180 | public boolean equals(Object that) { |
181 | if (!super.equals(that)) return false; | 181 | if (that == null) return false; |
182 | if (that == this) return true; | ||
182 | if (!(that instanceof Cell)) return false; | 183 | if (!(that instanceof Cell)) return false; |
183 | return (((Cell) that).x == this.x && ((Cell) that).y == this.y); | 184 | return (((Cell) that).x == this.x && ((Cell) that).y == this.y); |
184 | } | 185 | } |