mache morgen weiter

This commit is contained in:
Michael S. 2024-02-28 21:39:47 +01:00
parent 79a048dfd6
commit 728f655e11

View file

@ -1,12 +1,32 @@
rules =[
# 0 1 2 3 4 5 6 7 8
#[False,False,False,True ,False,False,False,False,False], #geburt
#[True ,True ,False,False,True ,True ,True ,True ,True ] #tot
# 23/3
# bei 2 und 3 überleb
# bei 3 geburt
[False,False,False,True ,False,False,False,False,False], #geburt
[False,True ,True ,True ,True ,True ,False,False,False]
#tot
#12345/3
]
#rules = ([1,2,3,4,5],[3])
rules = ([2,3],[3])
def pixel(state, lives):
if state:
if lives <= 1 or lives >= 4:
new = False
if lives in rules[1] and state == True:
# fals überleben soll
return True
## .....
if lives in rules[1] and state == True:
# uberlebe
return True
else:
new = True
else:
if lives == 3:
new = True
else:
new = False
return new
return False
#return new
#if rules[0][lives] == False and rules[1][lives] == True: # soll überhaupt nix geschehen
# return state
#if rules[0][lives] == True: # wird geboren
# return True
#elif rules[1][lives] == True: # soll nix geschehen wen tot
# return state