GoL/rules.py
2024-02-28 19:47:39 +01:00

12 lines
246 B
Python

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