public class Location { public Location() { row = 0; col = 0; } public Location(int newRow, int newCol) { row = newRow; col = newCol; } public int getRow() { return row; } public int getCol() { return col; } public void setRow(int newRow) { row = newRow; } public void setCol(int newCol) { col = newCol; } public boolean equals(Location other) { return this.getRow() == other.getRow() && this.getCol() == other.getCol(); } public String toString() { return "(" + getRow() + ", " + getCol() + ")"; } private int row; private int col; public static final int LEFT = -90; public static final int RIGHT = 90; public static final int HALF_LEFT = -45; public static final int HALF_RIGHT = 45; public static final int FULL_CIRCLE = 360; public static final int HALF_CIRCLE = 180; public static final int NORTH = 0; public static final int NORTHEAST = 45; public static final int EAST = 90; public static final int SOUTHEAST = 135; public static final int SOUTH = 180; public static final int SOUTHWEST = 225; public static final int WEST = 270; public static final int NORTHWEST = 315; }