From 728f655e11dd504ba28807f207b12fc10c337848 Mon Sep 17 00:00:00 2001 From: Megamichi Date: Wed, 28 Feb 2024 21:39:47 +0100 Subject: [PATCH] mache morgen weiter --- rules.py | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/rules.py b/rules.py index 05a2c2a..a1fa01c 100644 --- a/rules.py +++ b/rules.py @@ -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 \ No newline at end of file