def pixel(state, lives): if state: if lives <= 1 or lives >= 4: new = False else: new = True else: if lives == 3: new = True else: new = False return new