private int pixelFitness(Wallpaper wp, int x, int y) {
        int fitness = 0;
        
        int pixelC = wp.pixels[y][x];

        for(int i = 1; i <= maxLookaround; i++) {
            int minYLook = Math.max(y-i, 0);
            int maxYLook = Math.min(y+i, maxY);
            int minXLook = Math.max(x-i, 0);
            int maxXLook = Math.min(x+i, maxX);
            
            int fitnessValueNW = pixelC ^ wp.pixels[minYLook][minXLook];
            int fitnessValueN = pixelC ^ wp.pixels[minYLook][x];
            int fitnessValueNE = pixelC ^ wp.pixels[minYLook][maxXLook];
            int fitnessValueW = pixelC ^ wp.pixels[y][minXLook];
            int fitnessValueE = pixelC ^ wp.pixels[y][maxXLook];
            int fitnessValueSW = pixelC ^ wp.pixels[maxYLook][minXLook];
            int fitnessValueS = pixelC ^ wp.pixels[maxYLook][x];
            int fitnessValueSE = pixelC ^ wp.pixels[maxYLook][maxXLook];

            fitness += (fitnessValueN <= maxDiff) ? (1) : (-1);
            fitness += (fitnessValueNE <= maxDiff) ? (1) : (-1);
            fitness += (fitnessValueE <= maxDiff) ? (1) : (-1);
            fitness += (fitnessValueSE <= maxDiff) ? (1) : (-1);
            fitness += (fitnessValueS <= maxDiff) ? (1) : (-1);
            fitness += (fitnessValueSW <= maxDiff) ? (1) : (-1);
            fitness += (fitnessValueW <= maxDiff) ? (1) : (-1);
            fitness += (fitnessValueNW <= maxDiff) ? (1) : (-1);
        }

        return fitness;
    }