public static int getXfromString(String location) {
		if ((location.charAt(0) == 'a')) {
			return 0;
		}
		if ((location.charAt(0) == 'b')) {
			return 1;
		}
		if ((location.charAt(0) == 'c')) {
			return 2;
		}
		if ((location.charAt(0) == 'd')) {
			return 3;
		}
		if ((location.charAt(0) == 'e')) {
			return 4;
		}
		if ((location.charAt(0) == 'f')) {
			return 5;
		}
		if ((location.charAt(0) == 'g')) {
			return 6;
		}
		if ((location.charAt(0) == 'h')) {
			return 7;
		}
		return -1;
	}