public class Location { private int x, y; private boolean remote, isNew; public Location(int x, int y, boolean remote, boolean isNew) { this.x = x; this.y = y; this.remote = remote; this.isNew = isNew; } public int getX() { return this.x; } public int getY() { return this.y; } public boolean isRemote() { return this.remote; } public boolean isNew() { return this.isNew; } public void noLongerNew() { this.isNew = false; } public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final Location other = (Location) obj; if ((Math.abs(x - other.x) > Utils.PARTY_RADIUS) || (Math.abs(y - other.y) > Utils.PARTY_RADIUS)) return false; return true; } }