def decode_sprite(channelA, channelB):
    s = []
    y = 0
    for y in range(0, 8):
        a = channelA[y]
        b = channelB[y]
        line = []
        for x in range(0, 8):
            bit = pow(2, x - 7)
            pixel = -1
            if (not (a & bit) and not (b & bit)):
                pixel = 0
            elif ((a & bit) and not (b & bit)):
                pixel = 1
            elif (not (a & bit) and (b & bit)):
                pixel = 2
            elif ((a & bit) and (b & bit)):
                pixel = 3
            line.append(pixel)
        s.append(line)
    return s
dataset/ETHPy150Open gutomaia/pyNES/pynes/sprite.py/decode_sprite/swapped operands of `-`