* 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/>.
*)
+
+module type Automaton = sig
+ val name : string
+
+ type t
+
+ val neighbours : (int * int) list
+
+ val transition : t list -> t -> t
+
+ val default : t
+
+ val prev : t -> t
+
+ val next : t -> t
+
+ val color : t -> Graphics.color
+end
+
+let automata = []
* 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/>.
*)
+
+module type Automaton = sig
+ val name : string
+
+ type t
+
+ val neighbours : (int * int) list
+
+ val transition : t list -> t -> t
+
+ val default : t
+
+ val prev : t -> t
+
+ val next : t -> t
+
+ val color : t -> Graphics.color
+end
+
+val automata : (module Automaton) list
+(include_subdirs unqualified)
+
(library
- (name automata))
+ (name automata)
+ (libraries graphics))
(executable
(public_name cells)
(name main)
- (libraries automata))
+ (libraries automata graphics))
* with this program. If not, see <https://www.gnu.org/licenses/>.
*)
-let () = Printf.printf "Hello, world !\n"
+let () =
+ List.iter
+ (fun m ->
+ let module Automaton = (val m : Automata.Automaton) in
+ Printf.printf "%s\n" Automaton.name)
+ Automata.automata
(name cells)
(synopsis "Un simulateur d'automates cellulaires.")
(description "Un système pour simuler n'importe quel automate cellulaire en deux dimensions (à condition d'en faire un module OCaml).")
- (depends ocaml dune)
+ (depends ocaml dune graphics)
(tags ("cellular" "automaton" "automata")))