package net.woodyfolsom.msproj.sgf;

public class SGFCoord {
	private char column;
	private char row;

	public SGFCoord(String coords) {
		if (coords == null || coords.length() != 2) {
			throw new IllegalArgumentException(coords);
		}
		column = coords.charAt(0);
		row = coords.charAt(1);
	}

	public SGFCoord(char column, char row) {
		this.column = column;
		this.row = row;
	}

	public char getColumn() {
		return column;
	}

	public char getRow() {
		return row;
	}

	@Override
	public String toString() {
		return new String(new char[] { column, row });
	}
}