]> git.f4mnq.fr Git - cells.git/commitdiff
Plus besoin des graphismes pour les automates eux mêmes
authorAmélia Coutard-Sander <git@f4mnq.fr>
Wed, 7 Jan 2026 13:38:51 +0000 (14:38 +0100)
committerAmélia Coutard-Sander <git@f4mnq.fr>
Wed, 7 Jan 2026 13:53:53 +0000 (14:53 +0100)
Bien sûr, les graphismes restent nécessaires pour l'affichage.

automata/automata.ml
automata/automata.mli
automata/automata/life.ml
automata/automata/wireworld.ml
automata/dune

index 53bb97325d73dce9ec5e2ac155a8bf26f3883982..1646095c3f8fdf4c981dfafea4115c7fad3dbc82 100644 (file)
@@ -28,7 +28,7 @@ module type Automaton = sig
 
   val next : t -> t
 
-  val color : t -> Graphics.color
+  val color : t -> char * char * char
 end
 
 let automata = [(module Life : Automaton); (module Wireworld : Automaton)]
index 4b129983742e2e22c0ba22be08267e02161e901e..74da410145f7e51679819e216c2004ff3e708507 100644 (file)
@@ -28,7 +28,7 @@ module type Automaton = sig
 
   val next : t -> t
 
-  val color : t -> Graphics.color
+  val color : t -> char * char * char
 end
 
 val automata : (module Automaton) list
index f5afcc429757b510840adae7e05374a8d76dc5ef..13997308b129bab34d052fcdf503fd99f970d62f 100644 (file)
@@ -34,5 +34,5 @@ let next = function
         | Alive -> Dead
 
 let color = function
-        | Dead -> Graphics.rgb 0 0 31
-        | Alive -> Graphics.rgb 255 255 255
+        | Dead -> ('\x00', '\x00', '\x1F')
+        | Alive -> ('\xFF', '\xFF', '\xFF')
index c9c9b6016c8961a03c28eec7709bf99122fa42e3..e6a02eeabc3ea7f2673261ea93eb413ad1470d73 100644 (file)
@@ -42,7 +42,7 @@ let next = function
         | Tail -> Empty
 
 let color = function
-        | Empty -> Graphics.rgb 0 0 31
-        | Conductor -> Graphics.rgb 191 191 0
-        | Head -> Graphics.rgb 191 0 0
-        | Tail -> Graphics.rgb 0 0 191
+        | Empty -> ('\x00', '\x00', '\x1F')
+        | Conductor -> ('\xBF', '\xBF', '\x00')
+        | Head -> ('\xBF', '\x00', '\x00')
+        | Tail -> ('\x00', '\x00', '\xBF')
index c503e3a1950079c7beaa902ebbad497b145841a9..d1805a679caf3536a3fbb44cd97473c75f1308f9 100644 (file)
@@ -1,5 +1,4 @@
 (include_subdirs unqualified)
 
 (library
- (name automata)
- (libraries graphics))
+ (name automata))