public int getEvaluatedIndex(int xVal, int yVal) {
        boolean flipX = ((attrib & 0x40) == 0x40);
        boolean flipY = ((attrib & 0x80) == 0x80);
        int newX = xVal - x;
        int newY = yVal - y;
        if((newX < 0) || (newX >= 8) || (newY < 0) || (newY>= 8) ){
            System.err.println("BAD ARGS");
        }
        if(flipX) { newX = 7 - newX; }
        if(flipY) { newY = 7 - newY; }
        return pix[newY*8 + newX];
    }