From: Amélia Coutard-Sander Date: Thu, 12 Dec 2024 23:22:10 +0000 (+0100) Subject: Bug dans le jeu de la vie X-Git-Url: https://git.ameliathe1st.gay/?a=commitdiff_plain;h=8ff354e23ccd43be884713090185dd4d49c4f462;p=cells.git Bug dans le jeu de la vie --- diff --git a/automata/automata/life.ml b/automata/automata/life.ml index 570ca4b..69267bf 100644 --- a/automata/automata/life.ml +++ b/automata/automata/life.ml @@ -21,7 +21,7 @@ let neighbours = [(-1, -1); (-1, 0); (-1, 1); (0, -1); (0, 1); (1, -1); (1, 0); let transition l c = let n = List.length (List.filter (( = ) Alive) l) in - if n <= 2 || n >= 4 then Dead else if n == 3 then Alive else c + if n < 2 || n > 3 then Dead else if n == 3 then Alive else c let default = Dead