public boolean trySetValue(int x, int y, String strVal, Sudoku sdk) {
		/*
		 * If the value is an empty String, set a 0 in the Sudoku.
		 */
		int iVal = 0;
		if (!strVal.equals("")) {
			/*
			 * Try to parse the number.
			 */
			try {
				iVal = Integer.parseInt(strVal);
			} catch (NumberFormatException e) {
				return false;
			}
		}

		/*
		 * The value must be between 0 and 9.
		 */
		if (iVal < 0 || iVal > sdk.getSize()) {
			return false;
		}

		/*
		 * The x-coordinate must be between 0 and 9.
		 */
		if (x < 0 || x >= sdk.getSize()) {
			return false;
		}

		/*
		 * The y-coordinate must be between 0 and 9.
		 */
		if (y < 0 || y >= sdk.getSize()) {
			return false;
		}

		/*
		 * If in the startGrid this cell contains a value, the user is not
		 * allowed to set a value there since this is an essential clue.
		 */
		if (sdk.getStartGrid()[y][x] != 0) {
			return false;
		}

		/*
		 * After validating, set the value in the Sudoku.
		 */
		sdk.setValue(x, y, iVal);
		return true;
	}