Bien sûr, les graphismes restent nécessaires pour l'affichage.
val next : t -> t
- val color : t -> Graphics.color
+ val color : t -> char * char * char
end
let automata = [(module Life : Automaton); (module Wireworld : Automaton)]
val next : t -> t
- val color : t -> Graphics.color
+ val color : t -> char * char * char
end
val automata : (module Automaton) list
| 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')
| 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')
(include_subdirs unqualified)
(library
- (name automata)
- (libraries graphics))
+ (name automata))