X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=polymorphic-life%2F001%2Fsrc%2Fpolymorphic_life.ml;h=4a289923855094250e67b9a2a1328119578eeee1;hb=b36c0aefcdd063383fcb93863d47741d8bcc7d5a;hp=e25bbf623bb4ac49afc6447916e953ecd04c2f44;hpb=0ce0e7980a7b2b94b646d063127f064290340cfa;p=cellular-automata.git diff --git a/polymorphic-life/001/src/polymorphic_life.ml b/polymorphic-life/001/src/polymorphic_life.ml index e25bbf6..4a28992 100644 --- a/polymorphic-life/001/src/polymorphic_life.ml +++ b/polymorphic-life/001/src/polymorphic_life.ml @@ -85,7 +85,8 @@ module Conway : CELL = struct | D -> " " | A -> "o" - let init () = Random.int 2 |> of_int + let init () = + Random.int 2 |> of_int let state = to_int @@ -96,7 +97,8 @@ module Conway : CELL = struct | A when live_neighbors < 4 -> A | A when live_neighbors > 3 -> D | D when live_neighbors = 3 -> A - | t -> t + | A -> A + | D -> D end