GoL/rules.py

13 lines
246 B
Python
Raw Normal View History

2024-02-28 19:47:39 +01:00
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