aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD2016-02-22 16:07:39 +0100
committerPacien TRAN-GIRARD2016-02-22 16:07:39 +0100
commit0d82e2c08f643aa0ff1410248ac0e31bdf15a257 (patch)
tree60fa7de3ec07e089ba6e30def965c10d83dc4d9b
parentc9d137bcbe20550ec98736b8ffed8aaab756989c (diff)
downloadxblast-0d82e2c08f643aa0ff1410248ac0e31bdf15a257.tar.gz
Fix equality comparison
-rw-r--r--src/ch/epfl/xblast/Cell.java3
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 }