public class Position
extends java.lang.Object
| Constructor and Description |
|---|
Position(int x,
int y)
Creates a new position at the specified coordinates.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
getX()
Retrieves the X-coordinate of the position
|
int |
getY()
Retrieves the Y-coordinate of the position
|
int |
hashCode() |
public Position(int x,
int y)
x - the X-coordinate on the boardy - the Y-coordinate on the boardpublic int getX()
public int getY()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object