public boolean validateBlock(int x, int y) { // A block is here defined as a
													// 3x3 matrix within the
													// field
		boolean valid[] = { false, false, false, false, false, false, false,
				false, false }; // each boolean represents the value at its
								// index+1(so 1-9)
		for (int row = 0; row < 3; row++) {
			for (int col = 0; col < 3; col++) {
				int value = get(x * 3 + row, y * 3 + col) - 1; // comparing
																// against
																// index, which
																// starts at 0,
																// while the
																// values start
																// at 1
				if (value >= 0 && value < 9)
					valid[value] = true;
			}
		}
		boolean finalValid = true;
		for (int i = 0; i < 9; i++) {
			if (valid[i] == false)
				finalValid = false; // this value was not in the block
		}
		return finalValid;
	}