static applyMaskPenaltyRule2(matrix) {
			let penalty = 0;
			const array = matrix.getArray();
			const width = matrix.getWidth();
			const height = matrix.getHeight();
			for (let y = 0; y < height - 1; y++) {
				const arrayY = array[y];
				for (let x = 0; x < width - 1; x++) {
					const value = arrayY[x];
					if (value === arrayY[x + 1] && value === array[y + 1][x] && value === array[y + 1][x + 1]) {
						penalty++;
					}
				}
			}
			return MaskUtil.N2 * penalty;
		}
Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give
penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a
penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block.