diff --git a/server/src/main/java/fr/lnl/game/server/utils/Pair.java b/server/src/main/java/fr/lnl/game/server/utils/Pair.java index d5d9b57..ff6f167 100644 --- a/server/src/main/java/fr/lnl/game/server/utils/Pair.java +++ b/server/src/main/java/fr/lnl/game/server/utils/Pair.java @@ -2,22 +2,31 @@ package fr.lnl.game.server.utils; import java.util.Objects; -public class Pair { +public class Pair { - private X x; - private Y y; + private A a; + private B b; - public Pair(X x, Y y){ - this.x = x; - this.y = y; + public Pair(A a, B b){ + this.a = a; + this.b = b; } - public X getX() { - return this.x; + public A getA() { + return this.a; } - public Y getY() { - return y; + public B getB() { + return this.b; + } + + + public void setA(A a) { + this.a = a; + } + + public void setB(B b) { + this.b = b; } @Override @@ -25,11 +34,11 @@ public class Pair { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Pair point = (Pair) o; - return Objects.equals(x, point.x) && Objects.equals(y, point.y); + return Objects.equals(a, point.a) && Objects.equals(b, point.b); } @Override public int hashCode() { - return Objects.hash(x, y); + return Objects.hash(a, b); } } diff --git a/server/src/main/java/fr/lnl/game/server/utils/Point.java b/server/src/main/java/fr/lnl/game/server/utils/Point.java index 2091450..1c2be78 100644 --- a/server/src/main/java/fr/lnl/game/server/utils/Point.java +++ b/server/src/main/java/fr/lnl/game/server/utils/Point.java @@ -5,5 +5,4 @@ public class Point extends Pair { public Point(int a, int b) { super(a, b); } - }