package TicTac; public final class TTMove { public int x; // row position of the move public int y; // column position of the move /** * @param x row position of the move * @param y column position of the move */ public TTMove(int x, int y) { this.x = x; this.y = y; } /** * @return a copy of move object */ public TTMove Copy() { TTMove copy = new TTMove(this.x, this.y); return copy; } public boolean isInbound() { return ((0 <= x) && (x < TTBoard.SIZE) && (0 <= y) && (y < TTBoard.SIZE)); } /** * return the String representation of move object */ public String toString() { return new String("["+x+","+y+"]"); } }