public boolean legal(int y, int x, int val, int[][] sudoku) {
		/*
		 * Check the cells row for violations
		 */
		for (int i = 0; i < this.sudokuSize; ++i) {
			if (val == sudoku[i][x]) {
				return false;
			}
		}

		/*
		 * Check the cells column for violations
		 */
		for (int i = 0; i < this.sudokuSize; ++i) {
			if (val == sudoku[y][i]) {
				return false;
			}
		}

		/*
		 * Calculate the where the carre starts and check the cells carree for
		 * violations.
		 */
		int yOffset = (y / this.carreeSize) * this.carreeSize;
		int xOffset = (x / this.carreeSize) * this.carreeSize;
		for (int i = 0; i < this.carreeSize; i++) {
			for (int k = 0; k < this.carreeSize; k++) {
				if (val == sudoku[yOffset + i][xOffset + k]) {
					return false;
				}
			}
		}
		return true;
	}