--- /dev/null
+(* Copyright 2024 Amélia COUTARD <https://www.ameliathe1st.gay>.
+ *
+ * This file from the program cells is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License along
+ * with this program. If not, see <https://www.gnu.org/licenses/>.
+ *)
+
+let name = "Labyrinthe B3S12345"
+
+type t = Sol | Mur
+
+let neighbours = [(-1, -1); (-1, 0); (-1, 1); (0, -1); (0, 1); (1, -1); (1, 0); (1, 1)]
+
+let transition l c =
+ let n = List.length (List.filter (( = ) Mur) l) in
+ if n < 1 || n > 5 then Sol else if n == 3 then Mur else c
+
+let default = Sol
+
+let prev = function
+ | Sol -> Mur
+ | Mur -> Sol
+
+let next = function
+ | Sol -> Mur
+ | Mur -> Sol
+
+let color = function
+ | Sol -> ('\x00', '\x00', '\x1F')
+ | Mur -> ('\xFF', '\xFF', '\xFF')