private int[][] createPattern() {
		List<Integer> positionNumbers = Arrays.asList(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15); //indices of the 16 places where a dot COULD be placed
		Collections.shuffle(positionNumbers); //randomize their order		
		List<Integer> dotPositions = positionNumbers.subList(0, 4); //get the first four i.e. four random numbers between 0 and 15 (without replacement)
		
		int[][] squares = new int[NCELLS][NCELLS]; 
		
		for (int nb:dotPositions) { //go through the four indices of the positions where we will place dots
			//get the row/col in a 4x4 matrix corresponding to those indices
			int row = (int) Math.floor(nb / NCELLS); 
			int col = nb % NCELLS;
			squares[row][col] = 1;
		}		
		
		//if either of the three criteria fails to uphold for the created pattern, create a new pattern.
		if (!CRC.validByCrc(squares)) {
			return createPattern(); //CRC not below the threshold
		}
		if (!NoAdjacencies.validByAdjacencies(squares)) {
			return createPattern();  //2 adjacent dots, or 3 or 4 dots in either diagonal
		}
		if (!MirrorAndRotation.validByMirroring(squares)) {
			return createPattern(); //mirroring or rotating the pattern creates at least one duplicate
		}
		return squares;
	}